@rocicorp/zero 0.7.2024120200 → 0.7.2024120700
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 +1 -1
- package/out/{chunk-C7M3BJ3Z.js → chunk-6HXO6VMP.js} +13 -12
- package/out/chunk-6HXO6VMP.js.map +7 -0
- package/out/{chunk-KL66XOAW.js → chunk-PFF4AHTF.js} +331 -241
- package/out/{chunk-KL66XOAW.js.map → chunk-PFF4AHTF.js.map} +4 -4
- package/out/otel/src/noop-span-exporter.d.ts +8 -0
- package/out/otel/src/noop-span-exporter.d.ts.map +1 -0
- package/out/otel/src/noop-span-exporter.js +14 -0
- package/out/otel/src/noop-span-exporter.js.map +1 -0
- package/out/otel/src/span.d.ts +5 -0
- package/out/otel/src/span.d.ts.map +1 -0
- package/out/otel/src/span.js +30 -0
- package/out/otel/src/span.js.map +1 -0
- package/out/otel/src/version.d.ts +2 -0
- package/out/otel/src/version.d.ts.map +1 -0
- package/out/otel/src/version.js +2 -0
- package/out/otel/src/version.js.map +1 -0
- package/out/react.js +12 -6
- package/out/react.js.map +2 -2
- package/out/shared/src/asserts.d.ts +1 -1
- package/out/shared/src/asserts.d.ts.map +1 -1
- package/out/shared/src/asserts.js +2 -1
- package/out/shared/src/asserts.js.map +1 -1
- package/out/solid.js +2 -2
- package/out/zero-cache/src/auth/load-schema.d.ts.map +1 -1
- package/out/zero-cache/src/auth/load-schema.js +4 -20
- package/out/zero-cache/src/auth/load-schema.js.map +1 -1
- package/out/zero-cache/src/auth/write-authorizer.js +10 -6
- package/out/zero-cache/src/auth/write-authorizer.js.map +1 -1
- package/out/zero-cache/src/config/zero-config.d.ts +11 -7
- package/out/zero-cache/src/config/zero-config.d.ts.map +1 -1
- package/out/zero-cache/src/config/zero-config.js +11 -7
- package/out/zero-cache/src/config/zero-config.js.map +1 -1
- package/out/zero-cache/src/server/change-streamer.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 +3 -3
- package/out/zero-cache/src/server/change-streamer.js.map +1 -1
- package/out/zero-cache/src/server/main.js +6 -11
- package/out/zero-cache/src/server/main.js.map +1 -1
- package/out/zero-cache/src/server/replicator.d.ts +1 -1
- package/out/zero-cache/src/server/replicator.d.ts.map +1 -1
- package/out/zero-cache/src/server/replicator.js +3 -3
- package/out/zero-cache/src/server/replicator.js.map +1 -1
- package/out/zero-cache/src/server/syncer.d.ts +1 -1
- package/out/zero-cache/src/server/syncer.d.ts.map +1 -1
- package/out/zero-cache/src/server/syncer.js +34 -5
- package/out/zero-cache/src/server/syncer.js.map +1 -1
- package/out/zero-cache/src/services/change-streamer/pg/change-source.d.ts.map +1 -1
- package/out/zero-cache/src/services/change-streamer/pg/change-source.js +31 -21
- package/out/zero-cache/src/services/change-streamer/pg/change-source.js.map +1 -1
- package/out/zero-cache/src/services/change-streamer/storer.d.ts.map +1 -1
- package/out/zero-cache/src/services/change-streamer/storer.js +11 -6
- package/out/zero-cache/src/services/change-streamer/storer.js.map +1 -1
- package/out/zero-cache/src/services/dispatcher/connect-params.d.ts +2 -1
- package/out/zero-cache/src/services/dispatcher/connect-params.d.ts.map +1 -1
- package/out/zero-cache/src/services/dispatcher/connect-params.js +3 -2
- package/out/zero-cache/src/services/dispatcher/connect-params.js.map +1 -1
- package/out/zero-cache/src/services/dispatcher/dispatcher.d.ts.map +1 -1
- package/out/zero-cache/src/services/dispatcher/dispatcher.js +5 -5
- package/out/zero-cache/src/services/dispatcher/dispatcher.js.map +1 -1
- package/out/zero-cache/src/services/mutagen/mutagen.d.ts +3 -3
- package/out/zero-cache/src/services/mutagen/mutagen.d.ts.map +1 -1
- package/out/zero-cache/src/services/mutagen/mutagen.js +31 -22
- package/out/zero-cache/src/services/mutagen/mutagen.js.map +1 -1
- package/out/zero-cache/src/services/runner.js +1 -4
- package/out/zero-cache/src/services/runner.js.map +1 -1
- package/out/zero-cache/src/services/view-syncer/client-handler.d.ts +1 -1
- package/out/zero-cache/src/services/view-syncer/client-handler.d.ts.map +1 -1
- package/out/zero-cache/src/services/view-syncer/client-handler.js +3 -2
- package/out/zero-cache/src/services/view-syncer/client-handler.js.map +1 -1
- package/out/zero-cache/src/services/view-syncer/cvr-store.d.ts +2 -2
- package/out/zero-cache/src/services/view-syncer/cvr-store.d.ts.map +1 -1
- package/out/zero-cache/src/services/view-syncer/cvr-store.js +45 -34
- package/out/zero-cache/src/services/view-syncer/cvr-store.js.map +1 -1
- package/out/zero-cache/src/services/view-syncer/cvr.d.ts.map +1 -1
- package/out/zero-cache/src/services/view-syncer/cvr.js +2 -2
- package/out/zero-cache/src/services/view-syncer/cvr.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 +16 -3
- 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 +5 -195
- package/out/zero-cache/src/services/view-syncer/schema/types.d.ts.map +1 -1
- package/out/zero-cache/src/services/view-syncer/view-syncer.d.ts +5 -5
- 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 +384 -357
- package/out/zero-cache/src/services/view-syncer/view-syncer.js.map +1 -1
- package/out/zero-cache/src/types/error-for-client.d.ts +10 -3
- package/out/zero-cache/src/types/error-for-client.d.ts.map +1 -1
- package/out/zero-cache/src/types/error-for-client.js +4 -4
- package/out/zero-cache/src/types/error-for-client.js.map +1 -1
- package/out/zero-cache/src/types/lite.d.ts.map +1 -1
- package/out/zero-cache/src/types/lite.js +1 -0
- package/out/zero-cache/src/types/lite.js.map +1 -1
- package/out/zero-cache/src/types/pg.d.ts +1 -1
- package/out/zero-cache/src/types/pg.d.ts.map +1 -1
- package/out/zero-cache/src/types/pg.js +33 -7
- package/out/zero-cache/src/types/pg.js.map +1 -1
- package/out/zero-cache/src/types/processes.d.ts +5 -1
- package/out/zero-cache/src/types/processes.d.ts.map +1 -1
- package/out/zero-cache/src/types/processes.js +12 -2
- package/out/zero-cache/src/types/processes.js.map +1 -1
- package/out/zero-cache/src/types/schema-versions.d.ts.map +1 -1
- package/out/zero-cache/src/types/schema-versions.js +4 -5
- package/out/zero-cache/src/types/schema-versions.js.map +1 -1
- package/out/zero-cache/src/workers/connection.d.ts +14 -6
- package/out/zero-cache/src/workers/connection.d.ts.map +1 -1
- package/out/zero-cache/src/workers/connection.js +78 -70
- 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 +8 -10
- package/out/zero-cache/src/workers/syncer.js.map +1 -1
- package/out/zero-client/src/client/context.d.ts +1 -1
- package/out/zero-client/src/client/context.d.ts.map +1 -1
- package/out/zero-client/src/client/options.d.ts +13 -14
- package/out/zero-client/src/client/options.d.ts.map +1 -1
- package/out/zero-client/src/client/query-manager.d.ts.map +1 -1
- package/out/zero-client/src/client/server-error.d.ts +5 -3
- package/out/zero-client/src/client/server-error.d.ts.map +1 -1
- package/out/zero-client/src/client/zero.d.ts.map +1 -1
- package/out/zero-client/src/mod.d.ts +2 -2
- package/out/zero-client/src/mod.d.ts.map +1 -1
- package/out/zero-protocol/src/ast.d.ts +8 -95
- package/out/zero-protocol/src/ast.d.ts.map +1 -1
- package/out/zero-protocol/src/ast.js +9 -9
- package/out/zero-protocol/src/ast.js.map +1 -1
- package/out/zero-protocol/src/change-desired-queries.d.ts +2 -78
- package/out/zero-protocol/src/change-desired-queries.d.ts.map +1 -1
- package/out/zero-protocol/src/connect.d.ts +2 -78
- package/out/zero-protocol/src/connect.d.ts.map +1 -1
- package/out/zero-protocol/src/down.d.ts +2 -78
- package/out/zero-protocol/src/down.d.ts.map +1 -1
- package/out/zero-protocol/src/error.d.ts +18 -1
- package/out/zero-protocol/src/error.d.ts.map +1 -1
- package/out/zero-protocol/src/error.js +12 -2
- package/out/zero-protocol/src/error.js.map +1 -1
- package/out/zero-protocol/src/poke.d.ts +4 -156
- package/out/zero-protocol/src/poke.d.ts.map +1 -1
- package/out/zero-protocol/src/protocol-version.d.ts +20 -0
- package/out/zero-protocol/src/protocol-version.d.ts.map +1 -0
- package/out/zero-protocol/src/protocol-version.js +20 -0
- package/out/zero-protocol/src/protocol-version.js.map +1 -0
- package/out/zero-protocol/src/queries-patch.d.ts +3 -117
- package/out/zero-protocol/src/queries-patch.d.ts.map +1 -1
- package/out/zero-protocol/src/up.d.ts +2 -78
- package/out/zero-protocol/src/up.d.ts.map +1 -1
- package/out/zero-react/src/use-query.d.ts +9 -1
- package/out/zero-react/src/use-query.d.ts.map +1 -1
- package/out/zero-schema/src/build-schema.d.ts.map +1 -1
- package/out/zero-schema/src/build-schema.js +2 -14
- package/out/zero-schema/src/build-schema.js.map +1 -1
- package/out/zero-schema/src/compiled-permissions.d.ts +17 -459
- package/out/zero-schema/src/compiled-permissions.d.ts.map +1 -1
- package/out/zero-schema/src/compiled-permissions.js +1 -1
- package/out/zero-schema/src/compiled-permissions.js.map +1 -1
- package/out/zero-schema/src/mod.d.ts +1 -1
- package/out/zero-schema/src/mod.d.ts.map +1 -1
- package/out/zero-schema/src/normalize-table-schema.d.ts +3 -2
- package/out/zero-schema/src/normalize-table-schema.d.ts.map +1 -1
- package/out/zero-schema/src/normalize-table-schema.js +39 -13
- package/out/zero-schema/src/normalize-table-schema.js.map +1 -1
- package/out/zero-schema/src/permissions.d.ts +2 -2
- package/out/zero-schema/src/permissions.d.ts.map +1 -1
- package/out/zero-schema/src/schema-config.d.ts +15 -29
- package/out/zero-schema/src/schema-config.d.ts.map +1 -1
- package/out/zero-schema/src/schema-config.js +39 -13
- package/out/zero-schema/src/schema-config.js.map +1 -1
- package/out/zero-schema/src/table-schema.d.ts +24 -38
- package/out/zero-schema/src/table-schema.d.ts.map +1 -1
- package/out/zero-schema/src/table-schema.js.map +1 -1
- package/out/zero.js +2 -2
- package/out/zql/src/builder/builder.d.ts.map +1 -1
- package/out/zql/src/builder/builder.js +9 -11
- package/out/zql/src/builder/builder.js.map +1 -1
- package/out/zql/src/ivm/array-view.d.ts +1 -1
- package/out/zql/src/ivm/array-view.d.ts.map +1 -1
- package/out/zql/src/ivm/array-view.js +16 -3
- package/out/zql/src/ivm/array-view.js.map +1 -1
- package/out/zql/src/ivm/data.d.ts +1 -1
- package/out/zql/src/ivm/data.d.ts.map +1 -1
- package/out/zql/src/ivm/data.js +3 -2
- package/out/zql/src/ivm/data.js.map +1 -1
- package/out/zql/src/ivm/exists.d.ts.map +1 -1
- package/out/zql/src/ivm/exists.js +13 -2
- package/out/zql/src/ivm/exists.js.map +1 -1
- package/out/zql/src/ivm/join.d.ts +3 -2
- package/out/zql/src/ivm/join.d.ts.map +1 -1
- package/out/zql/src/ivm/join.js +5 -2
- package/out/zql/src/ivm/join.js.map +1 -1
- package/out/zql/src/ivm/memory-source.d.ts +3 -12
- package/out/zql/src/ivm/memory-source.d.ts.map +1 -1
- package/out/zql/src/ivm/memory-source.js +38 -72
- package/out/zql/src/ivm/memory-source.js.map +1 -1
- package/out/zql/src/ivm/operator.d.ts +3 -1
- package/out/zql/src/ivm/operator.d.ts.map +1 -1
- package/out/zql/src/ivm/schema.d.ts +8 -3
- package/out/zql/src/ivm/schema.d.ts.map +1 -1
- package/out/zql/src/ivm/skip.d.ts.map +1 -1
- package/out/zql/src/ivm/skip.js +60 -54
- package/out/zql/src/ivm/skip.js.map +1 -1
- package/out/zql/src/ivm/source.d.ts +10 -0
- package/out/zql/src/ivm/source.d.ts.map +1 -1
- package/out/zql/src/ivm/take.d.ts.map +1 -1
- package/out/zql/src/ivm/take.js +47 -35
- package/out/zql/src/ivm/take.js.map +1 -1
- package/out/zql/src/ivm/view-apply-change.js +4 -2
- package/out/zql/src/ivm/view-apply-change.js.map +1 -1
- package/out/zql/src/ivm/view.d.ts +1 -1
- package/out/zql/src/ivm/view.d.ts.map +1 -1
- package/out/zql/src/query/auth-query.d.ts +1 -0
- package/out/zql/src/query/auth-query.d.ts.map +1 -1
- package/out/zql/src/query/auth-query.js +1 -0
- package/out/zql/src/query/auth-query.js.map +1 -1
- package/out/zql/src/query/expression.d.ts +3 -2
- package/out/zql/src/query/expression.d.ts.map +1 -1
- package/out/zql/src/query/expression.js.map +1 -1
- package/out/zql/src/query/query-impl.d.ts +8 -6
- package/out/zql/src/query/query-impl.d.ts.map +1 -1
- package/out/zql/src/query/query-impl.js +18 -4
- package/out/zql/src/query/query-impl.js.map +1 -1
- package/out/zql/src/query/query.d.ts +9 -5
- package/out/zql/src/query/query.d.ts.map +1 -1
- package/out/zql/src/query/typed-view.d.ts +2 -1
- package/out/zql/src/query/typed-view.d.ts.map +1 -1
- package/out/zqlite/src/db.js +1 -1
- package/out/zqlite/src/table-source.d.ts +1 -0
- package/out/zqlite/src/table-source.d.ts.map +1 -1
- package/out/zqlite/src/table-source.js +40 -70
- package/out/zqlite/src/table-source.js.map +1 -1
- package/package.json +5 -1
- package/out/chunk-C7M3BJ3Z.js.map +0 -7
- package/out/shared/src/random-values.js +0 -22
- package/out/shared/src/random-values.js.map +0 -1
- package/out/zero-client/src/client/protocol-version.d.ts +0 -2
- package/out/zero-client/src/client/protocol-version.d.ts.map +0 -1
- package/out/zql/src/ivm/lookahead-iterator.d.ts +0 -13
- package/out/zql/src/ivm/lookahead-iterator.d.ts.map +0 -1
- package/out/zql/src/ivm/lookahead-iterator.js +0 -45
- package/out/zql/src/ivm/lookahead-iterator.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../../../zero-protocol/src/error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAEhD,6CAA6C;AAC7C,4DAA4D;AAC5D,gCAAgC;AAEhC,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../../../zero-protocol/src/error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAEhD,6CAA6C;AAC7C,4DAA4D;AAC5D,gCAAgC;AAEhC,MAAM,CAAN,IAAY,SAgBX;AAhBD,WAAY,SAAS;IACnB,gDAAmC,CAAA;IACnC,8CAAiC,CAAA;IACjC,kEAAqD,CAAA;IACrD,sFAAyE,CAAA;IACzE,8FAAiF,CAAA;IACjF,4FAA+E,CAAA;IAC/E,8CAAiC,CAAA;IACjC,wCAA2B,CAAA;IAC3B,8CAAiC,CAAA;IACjC,wDAA2C,CAAA;IAC3C,0CAA6B,CAAA;IAC7B,wDAA2C,CAAA;IAC3C,oEAAuD,CAAA;IACvD,kDAAqC,CAAA;IACrC,kCAAqB,CAAA;AACvB,CAAC,EAhBW,SAAS,KAAT,SAAS,QAgBpB;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CACpC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,eAAe,CAAC,EACpC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,cAAc,CAAC,EACnC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,wBAAwB,CAAC,EAC7C,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,kCAAkC,CAAC,EACvD,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,sCAAsC,CAAC,EAC3D,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,qCAAqC,CAAC,EAC1D,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,cAAc,CAAC,EACnC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,EAChC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,mBAAmB,CAAC,EACxC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,cAAc,CAAC,EACnC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,YAAY,CAAC,EACjC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,mBAAmB,CAAC,EACxC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,yBAAyB,CAAC,EAC9C,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,CAC9B,CAAC;AAEF,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,IAAI,EAAE,eAAe;IACrB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;CACpB,CAAC,CAAC;AAEH,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,gBAAgB,CAAC;IAC3C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACpC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CACpC,oBAAoB,EACpB,0BAA0B,CAC3B,CAAC;AAMF,MAAM,CAAC,MAAM,kBAAkB,GAAyB,CAAC,CAAC,KAAK,CAAC;IAC9D,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;IAClB,eAAe;CAChB,CAAC,CAAC"}
|
|
@@ -52,45 +52,7 @@ export declare const pokePartBodySchema: v.ObjectType<{
|
|
|
52
52
|
desiredQueriesPatches: v.Optional<Record<string, ({
|
|
53
53
|
op: "put";
|
|
54
54
|
hash: string;
|
|
55
|
-
ast:
|
|
56
|
-
schema?: string | undefined;
|
|
57
|
-
alias?: string | undefined;
|
|
58
|
-
where?: {
|
|
59
|
-
type: "simple";
|
|
60
|
-
op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
|
|
61
|
-
left: {
|
|
62
|
-
type: "literal";
|
|
63
|
-
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
64
|
-
} | {
|
|
65
|
-
type: "column";
|
|
66
|
-
name: string;
|
|
67
|
-
} | {
|
|
68
|
-
type: "static";
|
|
69
|
-
anchor: "authData" | "preMutationRow";
|
|
70
|
-
field: string;
|
|
71
|
-
};
|
|
72
|
-
right: {
|
|
73
|
-
type: "literal";
|
|
74
|
-
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
75
|
-
} | {
|
|
76
|
-
type: "static";
|
|
77
|
-
anchor: "authData" | "preMutationRow";
|
|
78
|
-
field: string;
|
|
79
|
-
};
|
|
80
|
-
} | import("./ast.js").Conjunction | import("./ast.js").Disjunction | {
|
|
81
|
-
readonly type: "correlatedSubquery";
|
|
82
|
-
readonly related: import("./ast.js").CorrelatedSubquery;
|
|
83
|
-
readonly op: "EXISTS" | "NOT EXISTS";
|
|
84
|
-
} | undefined;
|
|
85
|
-
related?: readonly import("./ast.js").CorrelatedSubquery[] | undefined;
|
|
86
|
-
limit?: number | undefined;
|
|
87
|
-
orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
|
|
88
|
-
start?: {
|
|
89
|
-
row: Record<string, import("../../shared/src/json.js").ReadonlyJSONValue | undefined>;
|
|
90
|
-
exclusive: boolean;
|
|
91
|
-
} | undefined;
|
|
92
|
-
table: string;
|
|
93
|
-
};
|
|
55
|
+
ast: import("./ast.js").AST;
|
|
94
56
|
} | {
|
|
95
57
|
op: "del";
|
|
96
58
|
hash: string;
|
|
@@ -100,45 +62,7 @@ export declare const pokePartBodySchema: v.ObjectType<{
|
|
|
100
62
|
gotQueriesPatch: v.Optional<({
|
|
101
63
|
op: "put";
|
|
102
64
|
hash: string;
|
|
103
|
-
ast:
|
|
104
|
-
schema?: string | undefined;
|
|
105
|
-
alias?: string | undefined;
|
|
106
|
-
where?: {
|
|
107
|
-
type: "simple";
|
|
108
|
-
op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
|
|
109
|
-
left: {
|
|
110
|
-
type: "literal";
|
|
111
|
-
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
112
|
-
} | {
|
|
113
|
-
type: "column";
|
|
114
|
-
name: string;
|
|
115
|
-
} | {
|
|
116
|
-
type: "static";
|
|
117
|
-
anchor: "authData" | "preMutationRow";
|
|
118
|
-
field: string;
|
|
119
|
-
};
|
|
120
|
-
right: {
|
|
121
|
-
type: "literal";
|
|
122
|
-
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
123
|
-
} | {
|
|
124
|
-
type: "static";
|
|
125
|
-
anchor: "authData" | "preMutationRow";
|
|
126
|
-
field: string;
|
|
127
|
-
};
|
|
128
|
-
} | import("./ast.js").Conjunction | import("./ast.js").Disjunction | {
|
|
129
|
-
readonly type: "correlatedSubquery";
|
|
130
|
-
readonly related: import("./ast.js").CorrelatedSubquery;
|
|
131
|
-
readonly op: "EXISTS" | "NOT EXISTS";
|
|
132
|
-
} | undefined;
|
|
133
|
-
related?: readonly import("./ast.js").CorrelatedSubquery[] | undefined;
|
|
134
|
-
limit?: number | undefined;
|
|
135
|
-
orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
|
|
136
|
-
start?: {
|
|
137
|
-
row: Record<string, import("../../shared/src/json.js").ReadonlyJSONValue | undefined>;
|
|
138
|
-
exclusive: boolean;
|
|
139
|
-
} | undefined;
|
|
140
|
-
table: string;
|
|
141
|
-
};
|
|
65
|
+
ast: import("./ast.js").AST;
|
|
142
66
|
} | {
|
|
143
67
|
op: "del";
|
|
144
68
|
hash: string;
|
|
@@ -196,45 +120,7 @@ export declare const pokePartMessageSchema: v.TupleType<[v.Type<"pokePart">, v.O
|
|
|
196
120
|
desiredQueriesPatches: v.Optional<Record<string, ({
|
|
197
121
|
op: "put";
|
|
198
122
|
hash: string;
|
|
199
|
-
ast:
|
|
200
|
-
schema?: string | undefined;
|
|
201
|
-
alias?: string | undefined;
|
|
202
|
-
where?: {
|
|
203
|
-
type: "simple";
|
|
204
|
-
op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
|
|
205
|
-
left: {
|
|
206
|
-
type: "literal";
|
|
207
|
-
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
208
|
-
} | {
|
|
209
|
-
type: "column";
|
|
210
|
-
name: string;
|
|
211
|
-
} | {
|
|
212
|
-
type: "static";
|
|
213
|
-
anchor: "authData" | "preMutationRow";
|
|
214
|
-
field: string;
|
|
215
|
-
};
|
|
216
|
-
right: {
|
|
217
|
-
type: "literal";
|
|
218
|
-
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
219
|
-
} | {
|
|
220
|
-
type: "static";
|
|
221
|
-
anchor: "authData" | "preMutationRow";
|
|
222
|
-
field: string;
|
|
223
|
-
};
|
|
224
|
-
} | import("./ast.js").Conjunction | import("./ast.js").Disjunction | {
|
|
225
|
-
readonly type: "correlatedSubquery";
|
|
226
|
-
readonly related: import("./ast.js").CorrelatedSubquery;
|
|
227
|
-
readonly op: "EXISTS" | "NOT EXISTS";
|
|
228
|
-
} | undefined;
|
|
229
|
-
related?: readonly import("./ast.js").CorrelatedSubquery[] | undefined;
|
|
230
|
-
limit?: number | undefined;
|
|
231
|
-
orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
|
|
232
|
-
start?: {
|
|
233
|
-
row: Record<string, import("../../shared/src/json.js").ReadonlyJSONValue | undefined>;
|
|
234
|
-
exclusive: boolean;
|
|
235
|
-
} | undefined;
|
|
236
|
-
table: string;
|
|
237
|
-
};
|
|
123
|
+
ast: import("./ast.js").AST;
|
|
238
124
|
} | {
|
|
239
125
|
op: "del";
|
|
240
126
|
hash: string;
|
|
@@ -244,45 +130,7 @@ export declare const pokePartMessageSchema: v.TupleType<[v.Type<"pokePart">, v.O
|
|
|
244
130
|
gotQueriesPatch: v.Optional<({
|
|
245
131
|
op: "put";
|
|
246
132
|
hash: string;
|
|
247
|
-
ast:
|
|
248
|
-
schema?: string | undefined;
|
|
249
|
-
alias?: string | undefined;
|
|
250
|
-
where?: {
|
|
251
|
-
type: "simple";
|
|
252
|
-
op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
|
|
253
|
-
left: {
|
|
254
|
-
type: "literal";
|
|
255
|
-
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
256
|
-
} | {
|
|
257
|
-
type: "column";
|
|
258
|
-
name: string;
|
|
259
|
-
} | {
|
|
260
|
-
type: "static";
|
|
261
|
-
anchor: "authData" | "preMutationRow";
|
|
262
|
-
field: string;
|
|
263
|
-
};
|
|
264
|
-
right: {
|
|
265
|
-
type: "literal";
|
|
266
|
-
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
267
|
-
} | {
|
|
268
|
-
type: "static";
|
|
269
|
-
anchor: "authData" | "preMutationRow";
|
|
270
|
-
field: string;
|
|
271
|
-
};
|
|
272
|
-
} | import("./ast.js").Conjunction | import("./ast.js").Disjunction | {
|
|
273
|
-
readonly type: "correlatedSubquery";
|
|
274
|
-
readonly related: import("./ast.js").CorrelatedSubquery;
|
|
275
|
-
readonly op: "EXISTS" | "NOT EXISTS";
|
|
276
|
-
} | undefined;
|
|
277
|
-
related?: readonly import("./ast.js").CorrelatedSubquery[] | undefined;
|
|
278
|
-
limit?: number | undefined;
|
|
279
|
-
orderBy?: readonly (readonly [string, "asc" | "desc"])[] | undefined;
|
|
280
|
-
start?: {
|
|
281
|
-
row: Record<string, import("../../shared/src/json.js").ReadonlyJSONValue | undefined>;
|
|
282
|
-
exclusive: boolean;
|
|
283
|
-
} | undefined;
|
|
284
|
-
table: string;
|
|
285
|
-
};
|
|
133
|
+
ast: import("./ast.js").AST;
|
|
286
134
|
} | {
|
|
287
135
|
op: "del";
|
|
288
136
|
hash: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"poke.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/poke.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAMhD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,eAAO,MAAM,mBAAmB;;;;IAO9B;;;OAGG;;;;;;aAQH,CAAC;AAEH,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"poke.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/poke.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAMhD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,eAAO,MAAM,mBAAmB;;;;IAO9B;;;OAGG;;;;;;aAQH,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAc7B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;aAK5B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;IApCjC;;;OAGG;;;;;;eAoCH,CAAC;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAGhC,CAAC;AACH,eAAO,MAAM,oBAAoB;;;eAG/B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `PROTOCOL_VERSION` encompasses both the wire-protocol of the `/sync/...`
|
|
3
|
+
* connection between the browser and `zero-cache`, as well as the format of
|
|
4
|
+
* the `AST` objects stored in both components (i.e. IDB and CVR).
|
|
5
|
+
*
|
|
6
|
+
* A change in the `AST` schema (e.g. new functionality added) must be
|
|
7
|
+
* accompanied by an increment of the `PROTOCOL_VERSION` and a new major
|
|
8
|
+
* release. The server (`zero-cache`) must be deployed before clients start
|
|
9
|
+
* running the new code.
|
|
10
|
+
*
|
|
11
|
+
* The contract for backwards compatibility is that a `zero-cache` supports
|
|
12
|
+
* its current `PROTOCOL_VERSION` and the previous one (i.e.
|
|
13
|
+
* `PROTOCOL_VERSION - 1`, which is necessary to support old clients when
|
|
14
|
+
* the server is rolled out). This corresponds to supporting clients running
|
|
15
|
+
* the current release and the previous (major) release. Any client connections
|
|
16
|
+
* from earlier protocol versions are closed with a `VersionNotSupported`
|
|
17
|
+
* error.
|
|
18
|
+
*/
|
|
19
|
+
export declare const PROTOCOL_VERSION = 2;
|
|
20
|
+
//# sourceMappingURL=protocol-version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol-version.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/protocol-version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,gBAAgB,IAAI,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `PROTOCOL_VERSION` encompasses both the wire-protocol of the `/sync/...`
|
|
3
|
+
* connection between the browser and `zero-cache`, as well as the format of
|
|
4
|
+
* the `AST` objects stored in both components (i.e. IDB and CVR).
|
|
5
|
+
*
|
|
6
|
+
* A change in the `AST` schema (e.g. new functionality added) must be
|
|
7
|
+
* accompanied by an increment of the `PROTOCOL_VERSION` and a new major
|
|
8
|
+
* release. The server (`zero-cache`) must be deployed before clients start
|
|
9
|
+
* running the new code.
|
|
10
|
+
*
|
|
11
|
+
* The contract for backwards compatibility is that a `zero-cache` supports
|
|
12
|
+
* its current `PROTOCOL_VERSION` and the previous one (i.e.
|
|
13
|
+
* `PROTOCOL_VERSION - 1`, which is necessary to support old clients when
|
|
14
|
+
* the server is rolled out). This corresponds to supporting clients running
|
|
15
|
+
* the current release and the previous (major) release. Any client connections
|
|
16
|
+
* from earlier protocol versions are closed with a `VersionNotSupported`
|
|
17
|
+
* error.
|
|
18
|
+
*/
|
|
19
|
+
export const PROTOCOL_VERSION = 2;
|
|
20
|
+
//# sourceMappingURL=protocol-version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol-version.js","sourceRoot":"","sources":["../../../../zero-protocol/src/protocol-version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC"}
|
|
@@ -2,45 +2,7 @@ import * as v from '../../shared/src/valita.js';
|
|
|
2
2
|
declare const putOpSchema: v.ObjectType<{
|
|
3
3
|
op: v.Type<"put">;
|
|
4
4
|
hash: v.Type<string>;
|
|
5
|
-
ast: v.
|
|
6
|
-
schema: v.Optional<string>;
|
|
7
|
-
table: v.Type<string>;
|
|
8
|
-
alias: v.Optional<string>;
|
|
9
|
-
where: v.Optional<{
|
|
10
|
-
type: "simple";
|
|
11
|
-
op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
|
|
12
|
-
left: {
|
|
13
|
-
type: "literal";
|
|
14
|
-
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
15
|
-
} | {
|
|
16
|
-
type: "column";
|
|
17
|
-
name: string;
|
|
18
|
-
} | {
|
|
19
|
-
type: "static";
|
|
20
|
-
anchor: "authData" | "preMutationRow";
|
|
21
|
-
field: string;
|
|
22
|
-
};
|
|
23
|
-
right: {
|
|
24
|
-
type: "literal";
|
|
25
|
-
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
26
|
-
} | {
|
|
27
|
-
type: "static";
|
|
28
|
-
anchor: "authData" | "preMutationRow";
|
|
29
|
-
field: string;
|
|
30
|
-
};
|
|
31
|
-
} | import("./ast.js").Conjunction | import("./ast.js").Disjunction | {
|
|
32
|
-
readonly type: "correlatedSubquery";
|
|
33
|
-
readonly related: import("./ast.js").CorrelatedSubquery;
|
|
34
|
-
readonly op: "EXISTS" | "NOT EXISTS";
|
|
35
|
-
}>;
|
|
36
|
-
related: v.Optional<readonly import("./ast.js").CorrelatedSubquery[]>;
|
|
37
|
-
limit: v.Optional<number>;
|
|
38
|
-
orderBy: v.Optional<readonly (readonly [string, "asc" | "desc"])[]>;
|
|
39
|
-
start: v.Optional<{
|
|
40
|
-
row: Record<string, import("../../shared/src/json.js").ReadonlyJSONValue | undefined>;
|
|
41
|
-
exclusive: boolean;
|
|
42
|
-
}>;
|
|
43
|
-
}, undefined>;
|
|
5
|
+
ast: v.Type<import("./ast.js").AST>;
|
|
44
6
|
}, undefined>;
|
|
45
7
|
declare const delOpSchema: v.ObjectType<{
|
|
46
8
|
op: v.Type<"del">;
|
|
@@ -52,45 +14,7 @@ declare const clearOpSchema: v.ObjectType<{
|
|
|
52
14
|
declare const patchOpSchema: v.UnionType<[v.ObjectType<{
|
|
53
15
|
op: v.Type<"put">;
|
|
54
16
|
hash: v.Type<string>;
|
|
55
|
-
ast: v.
|
|
56
|
-
schema: v.Optional<string>;
|
|
57
|
-
table: v.Type<string>;
|
|
58
|
-
alias: v.Optional<string>;
|
|
59
|
-
where: v.Optional<{
|
|
60
|
-
type: "simple";
|
|
61
|
-
op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
|
|
62
|
-
left: {
|
|
63
|
-
type: "literal";
|
|
64
|
-
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
65
|
-
} | {
|
|
66
|
-
type: "column";
|
|
67
|
-
name: string;
|
|
68
|
-
} | {
|
|
69
|
-
type: "static";
|
|
70
|
-
anchor: "authData" | "preMutationRow";
|
|
71
|
-
field: string;
|
|
72
|
-
};
|
|
73
|
-
right: {
|
|
74
|
-
type: "literal";
|
|
75
|
-
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
76
|
-
} | {
|
|
77
|
-
type: "static";
|
|
78
|
-
anchor: "authData" | "preMutationRow";
|
|
79
|
-
field: string;
|
|
80
|
-
};
|
|
81
|
-
} | import("./ast.js").Conjunction | import("./ast.js").Disjunction | {
|
|
82
|
-
readonly type: "correlatedSubquery";
|
|
83
|
-
readonly related: import("./ast.js").CorrelatedSubquery;
|
|
84
|
-
readonly op: "EXISTS" | "NOT EXISTS";
|
|
85
|
-
}>;
|
|
86
|
-
related: v.Optional<readonly import("./ast.js").CorrelatedSubquery[]>;
|
|
87
|
-
limit: v.Optional<number>;
|
|
88
|
-
orderBy: v.Optional<readonly (readonly [string, "asc" | "desc"])[]>;
|
|
89
|
-
start: v.Optional<{
|
|
90
|
-
row: Record<string, import("../../shared/src/json.js").ReadonlyJSONValue | undefined>;
|
|
91
|
-
exclusive: boolean;
|
|
92
|
-
}>;
|
|
93
|
-
}, undefined>;
|
|
17
|
+
ast: v.Type<import("./ast.js").AST>;
|
|
94
18
|
}, undefined>, v.ObjectType<{
|
|
95
19
|
op: v.Type<"del">;
|
|
96
20
|
hash: v.Type<string>;
|
|
@@ -100,45 +24,7 @@ declare const patchOpSchema: v.UnionType<[v.ObjectType<{
|
|
|
100
24
|
export declare const queriesPatchSchema: v.ArrayType<v.UnionType<[v.ObjectType<{
|
|
101
25
|
op: v.Type<"put">;
|
|
102
26
|
hash: v.Type<string>;
|
|
103
|
-
ast: v.
|
|
104
|
-
schema: v.Optional<string>;
|
|
105
|
-
table: v.Type<string>;
|
|
106
|
-
alias: v.Optional<string>;
|
|
107
|
-
where: v.Optional<{
|
|
108
|
-
type: "simple";
|
|
109
|
-
op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
|
|
110
|
-
left: {
|
|
111
|
-
type: "literal";
|
|
112
|
-
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
113
|
-
} | {
|
|
114
|
-
type: "column";
|
|
115
|
-
name: string;
|
|
116
|
-
} | {
|
|
117
|
-
type: "static";
|
|
118
|
-
anchor: "authData" | "preMutationRow";
|
|
119
|
-
field: string;
|
|
120
|
-
};
|
|
121
|
-
right: {
|
|
122
|
-
type: "literal";
|
|
123
|
-
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
124
|
-
} | {
|
|
125
|
-
type: "static";
|
|
126
|
-
anchor: "authData" | "preMutationRow";
|
|
127
|
-
field: string;
|
|
128
|
-
};
|
|
129
|
-
} | import("./ast.js").Conjunction | import("./ast.js").Disjunction | {
|
|
130
|
-
readonly type: "correlatedSubquery";
|
|
131
|
-
readonly related: import("./ast.js").CorrelatedSubquery;
|
|
132
|
-
readonly op: "EXISTS" | "NOT EXISTS";
|
|
133
|
-
}>;
|
|
134
|
-
related: v.Optional<readonly import("./ast.js").CorrelatedSubquery[]>;
|
|
135
|
-
limit: v.Optional<number>;
|
|
136
|
-
orderBy: v.Optional<readonly (readonly [string, "asc" | "desc"])[]>;
|
|
137
|
-
start: v.Optional<{
|
|
138
|
-
row: Record<string, import("../../shared/src/json.js").ReadonlyJSONValue | undefined>;
|
|
139
|
-
exclusive: boolean;
|
|
140
|
-
}>;
|
|
141
|
-
}, undefined>;
|
|
27
|
+
ast: v.Type<import("./ast.js").AST>;
|
|
142
28
|
}, undefined>, v.ObjectType<{
|
|
143
29
|
op: v.Type<"del">;
|
|
144
30
|
hash: v.Type<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queries-patch.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/queries-patch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAGhD,QAAA,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"queries-patch.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/queries-patch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAGhD,QAAA,MAAM,WAAW;;;;aAIf,CAAC;AAEH,QAAA,MAAM,WAAW;;;aAGf,CAAC;AAEH,QAAA,MAAM,aAAa;;aAEjB,CAAC;AAEH,QAAA,MAAM,aAAa;;;;;;;;;eAAmD,CAAC;AAEvE,eAAO,MAAM,kBAAkB;;;;;;;;;gBAAyB,CAAC;AAEzD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AACvD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AACvD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAC3D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAC3D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -3,45 +3,7 @@ export declare const upstreamSchema: v.UnionType<[v.TupleType<[v.Type<"initConne
|
|
|
3
3
|
desiredQueriesPatch: v.ArrayType<v.UnionType<[v.ObjectType<{
|
|
4
4
|
op: v.Type<"put">;
|
|
5
5
|
hash: v.Type<string>;
|
|
6
|
-
ast: v.
|
|
7
|
-
schema: v.Optional<string>;
|
|
8
|
-
table: v.Type<string>;
|
|
9
|
-
alias: v.Optional<string>;
|
|
10
|
-
where: v.Optional<{
|
|
11
|
-
type: "simple";
|
|
12
|
-
op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
|
|
13
|
-
left: {
|
|
14
|
-
type: "literal";
|
|
15
|
-
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
16
|
-
} | {
|
|
17
|
-
type: "column";
|
|
18
|
-
name: string;
|
|
19
|
-
} | {
|
|
20
|
-
type: "static";
|
|
21
|
-
anchor: "authData" | "preMutationRow";
|
|
22
|
-
field: string;
|
|
23
|
-
};
|
|
24
|
-
right: {
|
|
25
|
-
type: "literal";
|
|
26
|
-
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
27
|
-
} | {
|
|
28
|
-
type: "static";
|
|
29
|
-
anchor: "authData" | "preMutationRow";
|
|
30
|
-
field: string;
|
|
31
|
-
};
|
|
32
|
-
} | import("./ast.js").Conjunction | import("./ast.js").Disjunction | {
|
|
33
|
-
readonly type: "correlatedSubquery";
|
|
34
|
-
readonly related: import("./ast.js").CorrelatedSubquery;
|
|
35
|
-
readonly op: "EXISTS" | "NOT EXISTS";
|
|
36
|
-
}>;
|
|
37
|
-
related: v.Optional<readonly import("./ast.js").CorrelatedSubquery[]>;
|
|
38
|
-
limit: v.Optional<number>;
|
|
39
|
-
orderBy: v.Optional<readonly (readonly [string, "asc" | "desc"])[]>;
|
|
40
|
-
start: v.Optional<{
|
|
41
|
-
row: Record<string, import("../../shared/src/json.js").ReadonlyJSONValue | undefined>;
|
|
42
|
-
exclusive: boolean;
|
|
43
|
-
}>;
|
|
44
|
-
}, undefined>;
|
|
6
|
+
ast: v.Type<import("./ast.js").AST>;
|
|
45
7
|
}, undefined>, v.ObjectType<{
|
|
46
8
|
op: v.Type<"del">;
|
|
47
9
|
hash: v.Type<string>;
|
|
@@ -54,45 +16,7 @@ export declare const upstreamSchema: v.UnionType<[v.TupleType<[v.Type<"initConne
|
|
|
54
16
|
desiredQueriesPatch: v.ArrayType<v.UnionType<[v.ObjectType<{
|
|
55
17
|
op: v.Type<"put">;
|
|
56
18
|
hash: v.Type<string>;
|
|
57
|
-
ast: v.
|
|
58
|
-
schema: v.Optional<string>;
|
|
59
|
-
table: v.Type<string>;
|
|
60
|
-
alias: v.Optional<string>;
|
|
61
|
-
where: v.Optional<{
|
|
62
|
-
type: "simple";
|
|
63
|
-
op: "=" | "!=" | "IS" | "IS NOT" | "<" | ">" | "<=" | ">=" | "LIKE" | "NOT LIKE" | "ILIKE" | "NOT ILIKE" | "IN" | "NOT IN";
|
|
64
|
-
left: {
|
|
65
|
-
type: "literal";
|
|
66
|
-
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
67
|
-
} | {
|
|
68
|
-
type: "column";
|
|
69
|
-
name: string;
|
|
70
|
-
} | {
|
|
71
|
-
type: "static";
|
|
72
|
-
anchor: "authData" | "preMutationRow";
|
|
73
|
-
field: string;
|
|
74
|
-
};
|
|
75
|
-
right: {
|
|
76
|
-
type: "literal";
|
|
77
|
-
value: string | number | boolean | readonly (string | number | boolean)[] | null;
|
|
78
|
-
} | {
|
|
79
|
-
type: "static";
|
|
80
|
-
anchor: "authData" | "preMutationRow";
|
|
81
|
-
field: string;
|
|
82
|
-
};
|
|
83
|
-
} | import("./ast.js").Conjunction | import("./ast.js").Disjunction | {
|
|
84
|
-
readonly type: "correlatedSubquery";
|
|
85
|
-
readonly related: import("./ast.js").CorrelatedSubquery;
|
|
86
|
-
readonly op: "EXISTS" | "NOT EXISTS";
|
|
87
|
-
}>;
|
|
88
|
-
related: v.Optional<readonly import("./ast.js").CorrelatedSubquery[]>;
|
|
89
|
-
limit: v.Optional<number>;
|
|
90
|
-
orderBy: v.Optional<readonly (readonly [string, "asc" | "desc"])[]>;
|
|
91
|
-
start: v.Optional<{
|
|
92
|
-
row: Record<string, import("../../shared/src/json.js").ReadonlyJSONValue | undefined>;
|
|
93
|
-
exclusive: boolean;
|
|
94
|
-
}>;
|
|
95
|
-
}, undefined>;
|
|
19
|
+
ast: v.Type<import("./ast.js").AST>;
|
|
96
20
|
}, undefined>, v.ObjectType<{
|
|
97
21
|
op: v.Type<"del">;
|
|
98
22
|
hash: v.Type<string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"up.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/up.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAQhD,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"up.d.ts","sourceRoot":"","sources":["../../../../zero-protocol/src/up.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAQhD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAO1B,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import type { Query, QueryType, Smash } from '../../zero-client/src/mod.js';
|
|
2
2
|
import type { TableSchema } from '../../zero-schema/src/table-schema.js';
|
|
3
|
-
|
|
3
|
+
import type { ResultType } from '../../zql/src/query/typed-view.js';
|
|
4
|
+
export type QueryResultDetails = {
|
|
5
|
+
type: ResultType;
|
|
6
|
+
};
|
|
7
|
+
export type QueryResult<TReturn extends QueryType> = [
|
|
8
|
+
Smash<TReturn>,
|
|
9
|
+
QueryResultDetails
|
|
10
|
+
];
|
|
11
|
+
export declare function useQuery<TSchema extends TableSchema, TReturn extends QueryType>(q: Query<TSchema, TReturn>, enable?: boolean): QueryResult<TReturn>;
|
|
4
12
|
//# sourceMappingURL=use-query.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-query.d.ts","sourceRoot":"","sources":["../../../../zero-react/src/use-query.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,KAAK,EACL,SAAS,EAET,KAAK,EAEN,MAAM,8BAA8B,CAAC;AAGtC,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"use-query.d.ts","sourceRoot":"","sources":["../../../../zero-react/src/use-query.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,KAAK,EACL,SAAS,EAET,KAAK,EAEN,MAAM,8BAA8B,CAAC;AAGtC,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,uCAAuC,CAAC;AACvE,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,mCAAmC,CAAC;AAElE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,UAAU,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,WAAW,CAAC,OAAO,SAAS,SAAS,IAAI;IACnD,KAAK,CAAC,OAAO,CAAC;IACd,kBAAkB;CACnB,CAAC;AAEF,wBAAgB,QAAQ,CACtB,OAAO,SAAS,WAAW,EAC3B,OAAO,SAAS,SAAS,EACzB,CAAC,EAAE,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,GAAE,OAAc,GAAG,WAAW,CAAC,OAAO,CAAC,CAS1E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-schema.d.ts","sourceRoot":"","sources":["../../../../zero-schema/src/build-schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"build-schema.d.ts","sourceRoot":"","sources":["../../../../zero-schema/src/build-schema.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAIhD,eAAO,MAAM,aAAa;;;;;;;;;;;CAmBzB,CAAC"}
|
|
@@ -2,11 +2,9 @@ import path from 'node:path';
|
|
|
2
2
|
import { fileURLToPath } from 'node:url';
|
|
3
3
|
import { tsImport } from 'tsx/esm/api';
|
|
4
4
|
import { writeFile } from 'node:fs/promises';
|
|
5
|
-
import { permissionsConfigSchema } from './compiled-permissions.js';
|
|
6
5
|
import * as v from '../../shared/src/valita.js';
|
|
7
6
|
import { parseOptions } from '../../shared/src/options.js';
|
|
8
|
-
import {
|
|
9
|
-
import { isSchemaConfig, replacePointersWithSchemaNames, } from './schema-config.js';
|
|
7
|
+
import { stringifySchema } from './schema-config.js';
|
|
10
8
|
export const schemaOptions = {
|
|
11
9
|
path: {
|
|
12
10
|
type: v.string().default('schema.ts'),
|
|
@@ -34,17 +32,7 @@ async function main() {
|
|
|
34
32
|
const relativePath = path.join(path.relative(dirname, path.dirname(absoluteConfigPath)), path.basename(absoluteConfigPath));
|
|
35
33
|
try {
|
|
36
34
|
const module = await tsImport(relativePath, import.meta.url);
|
|
37
|
-
|
|
38
|
-
throw new Error('Schema file must have a export `schema` and `permissions`.');
|
|
39
|
-
}
|
|
40
|
-
const schemaConfig = module;
|
|
41
|
-
const permissions = v.parse(await schemaConfig.permissions, permissionsConfigSchema);
|
|
42
|
-
const cycleFreeNormalizedSchema = replacePointersWithSchemaNames(normalizeSchema(schemaConfig.schema));
|
|
43
|
-
const output = {
|
|
44
|
-
permissions,
|
|
45
|
-
schema: cycleFreeNormalizedSchema,
|
|
46
|
-
};
|
|
47
|
-
await writeFile(config.output, JSON.stringify(output, undefined, 2));
|
|
35
|
+
await writeFile(config.output, await stringifySchema(module));
|
|
48
36
|
}
|
|
49
37
|
catch (e) {
|
|
50
38
|
console.error(`Failed to load zero schema from ${absoluteConfigPath}:`, e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-schema.js","sourceRoot":"","sources":["../../../../zero-schema/src/build-schema.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AACvC,OAAO,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAC;AACrC,OAAO,EAAC,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAC3C,OAAO,
|
|
1
|
+
{"version":3,"file":"build-schema.js","sourceRoot":"","sources":["../../../../zero-schema/src/build-schema.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AACvC,OAAO,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAC;AACrC,OAAO,EAAC,SAAS,EAAC,MAAM,kBAAkB,CAAC;AAC3C,OAAO,KAAK,CAAC,MAAM,4BAA4B,CAAC;AAChD,OAAO,EAAC,YAAY,EAAC,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAC,eAAe,EAAC,MAAM,oBAAoB,CAAC;AAEnD,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,IAAI,EAAE;QACJ,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC;QACrC,IAAI,EAAE;YACJ,6DAA6D;YAC7D,2DAA2D;SAC5D;QACD,KAAK,EAAE,GAAG;KACX;IACD,MAAM,EAAE;QACN,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,kBAAkB,CAAC;QAC5C,IAAI,EAAE;YACJ,iDAAiD;YACjD,EAAE;YACF,mEAAmE;YACnE,uDAAuD;SACxD;QACD,KAAK,EAAE,GAAG;KACX;CACF,CAAC;AAEF,KAAK,UAAU,IAAI;IACjB,MAAM,MAAM,GAAG,YAAY,CACzB,aAAa,EACb,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EACrB,cAAc,CACf,CAAC;IAEF,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7D,MAAM,kBAAkB,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACrD,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAC5B,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,EACxD,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAClC,CAAC;IAEF,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC7D,MAAM,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC;IAChE,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,CAAC,KAAK,CAAC,mCAAmC,kBAAkB,GAAG,EAAE,CAAC,CAAC,CAAC;QAC3E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,KAAK,IAAI,EAAE,CAAC"}
|