@evolu/common 7.4.0 → 8.0.0-next.0
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/README.md +4 -61
- package/dist/src/Array.d.ts +343 -102
- package/dist/src/Array.d.ts.map +1 -1
- package/dist/src/Array.js +181 -85
- package/dist/src/Assert.d.ts +57 -11
- package/dist/src/Assert.d.ts.map +1 -1
- package/dist/src/Assert.js +47 -11
- package/dist/src/BigInt.d.ts +6 -1
- package/dist/src/BigInt.d.ts.map +1 -1
- package/dist/src/BigInt.js +5 -0
- package/dist/src/Brand.d.ts +40 -12
- package/dist/src/Brand.d.ts.map +1 -1
- package/dist/src/Brand.js +5 -0
- package/dist/src/Buffer.d.ts +6 -1
- package/dist/src/Buffer.d.ts.map +1 -1
- package/dist/src/Buffer.js +7 -2
- package/dist/src/Cache.d.ts +10 -2
- package/dist/src/Cache.d.ts.map +1 -1
- package/dist/src/Cache.js +6 -0
- package/dist/src/Callbacks.d.ts +10 -7
- package/dist/src/Callbacks.d.ts.map +1 -1
- package/dist/src/Callbacks.js +23 -13
- package/dist/src/Console.d.ts +361 -69
- package/dist/src/Console.d.ts.map +1 -1
- package/dist/src/Console.js +217 -117
- package/dist/src/Crypto.d.ts +70 -21
- package/dist/src/Crypto.d.ts.map +1 -1
- package/dist/src/Crypto.js +72 -27
- package/dist/src/Eq.d.ts +22 -2
- package/dist/src/Eq.d.ts.map +1 -1
- package/dist/src/Eq.js +21 -1
- package/dist/src/Error.d.ts +23 -12
- package/dist/src/Error.d.ts.map +1 -1
- package/dist/src/Error.js +27 -11
- package/dist/src/Function.d.ts +128 -56
- package/dist/src/Function.d.ts.map +1 -1
- package/dist/src/Function.js +118 -14
- package/dist/src/Identicon.d.ts +5 -0
- package/dist/src/Identicon.d.ts.map +1 -1
- package/dist/src/Identicon.js +6 -1
- package/dist/src/Lookup.d.ts +160 -0
- package/dist/src/Lookup.d.ts.map +1 -0
- package/dist/src/Lookup.js +192 -0
- package/dist/src/Microtask.d.ts +21 -0
- package/dist/src/Microtask.d.ts.map +1 -0
- package/dist/src/Microtask.js +37 -0
- package/dist/src/Number.d.ts +18 -4
- package/dist/src/Number.d.ts.map +1 -1
- package/dist/src/Number.js +23 -1
- package/dist/src/Object.d.ts +110 -5
- package/dist/src/Object.d.ts.map +1 -1
- package/dist/src/Object.js +108 -5
- package/dist/src/Option.d.ts +58 -0
- package/dist/src/Option.d.ts.map +1 -0
- package/dist/src/Option.js +43 -0
- package/dist/src/Order.d.ts +5 -0
- package/dist/src/Order.d.ts.map +1 -1
- package/dist/src/Order.js +8 -3
- package/dist/src/Platform.d.ts +36 -2
- package/dist/src/Platform.d.ts.map +1 -1
- package/dist/src/Platform.js +10 -6
- package/dist/src/Polyfills.d.ts +27 -0
- package/dist/src/Polyfills.d.ts.map +1 -0
- package/dist/src/Polyfills.js +299 -0
- package/dist/src/Random.d.ts +18 -7
- package/dist/src/Random.d.ts.map +1 -1
- package/dist/src/Random.js +9 -7
- package/dist/src/Redacted.d.ts +7 -4
- package/dist/src/Redacted.d.ts.map +1 -1
- package/dist/src/Redacted.js +5 -0
- package/dist/src/Ref.d.ts +31 -16
- package/dist/src/Ref.d.ts.map +1 -1
- package/dist/src/Ref.js +35 -7
- package/dist/src/RefCount.d.ts +62 -0
- package/dist/src/RefCount.d.ts.map +1 -0
- package/dist/src/RefCount.js +83 -0
- package/dist/src/Relation.d.ts +84 -29
- package/dist/src/Relation.d.ts.map +1 -1
- package/dist/src/Relation.js +83 -105
- package/dist/src/Resource.d.ts +263 -0
- package/dist/src/Resource.d.ts.map +1 -0
- package/dist/src/Resource.js +389 -0
- package/dist/src/Result.d.ts +390 -374
- package/dist/src/Result.d.ts.map +1 -1
- package/dist/src/Result.js +142 -70
- package/dist/src/Schedule.d.ts +953 -0
- package/dist/src/Schedule.d.ts.map +1 -0
- package/dist/src/Schedule.js +1199 -0
- package/dist/src/Set.d.ts +181 -0
- package/dist/src/Set.d.ts.map +1 -0
- package/dist/src/Set.js +137 -0
- package/dist/src/Skiplist.d.ts +6 -1
- package/dist/src/Skiplist.d.ts.map +1 -1
- package/dist/src/Skiplist.js +5 -0
- package/dist/src/Sqlite.d.ts +160 -60
- package/dist/src/Sqlite.d.ts.map +1 -1
- package/dist/src/Sqlite.js +290 -190
- package/dist/src/Store.d.ts +36 -28
- package/dist/src/Store.d.ts.map +1 -1
- package/dist/src/Store.js +55 -15
- package/dist/src/String.d.ts +5 -0
- package/dist/src/String.d.ts.map +1 -1
- package/dist/src/String.js +5 -0
- package/dist/src/Task.d.ts +2263 -423
- package/dist/src/Task.d.ts.map +1 -1
- package/dist/src/Task.js +1488 -348
- package/dist/src/Test.d.ts +122 -0
- package/dist/src/Test.d.ts.map +1 -0
- package/dist/src/Test.js +66 -0
- package/dist/src/Time.d.ts +201 -48
- package/dist/src/Time.d.ts.map +1 -1
- package/dist/src/Time.js +190 -86
- package/dist/src/Tracer.d.ts +48 -0
- package/dist/src/Tracer.d.ts.map +1 -0
- package/dist/src/Tracer.js +6 -0
- package/dist/src/Type.d.ts +582 -209
- package/dist/src/Type.d.ts.map +1 -1
- package/dist/src/Type.js +362 -240
- package/dist/src/Types.d.ts +160 -6
- package/dist/src/Types.d.ts.map +1 -1
- package/dist/src/Types.js +22 -2
- package/dist/src/WebSocket.d.ts +113 -58
- package/dist/src/WebSocket.d.ts.map +1 -1
- package/dist/src/WebSocket.js +210 -118
- package/dist/src/Worker.d.ts +245 -60
- package/dist/src/Worker.d.ts.map +1 -1
- package/dist/src/Worker.js +220 -64
- package/dist/src/index.d.ts +25 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +19 -3
- package/dist/src/local-first/Db.d.ts +24 -213
- package/dist/src/local-first/Db.d.ts.map +1 -1
- package/dist/src/local-first/Db.js +622 -293
- package/dist/src/local-first/Error.d.ts +12 -0
- package/dist/src/local-first/Error.d.ts.map +1 -0
- package/dist/src/local-first/Error.js +6 -0
- package/dist/src/local-first/Evolu.d.ts +330 -285
- package/dist/src/local-first/Evolu.d.ts.map +1 -1
- package/dist/src/local-first/Evolu.js +472 -402
- package/dist/src/local-first/LocalAuth.d.ts +10 -10
- package/dist/src/local-first/LocalAuth.d.ts.map +1 -1
- package/dist/src/local-first/LocalAuth.js +6 -1
- package/dist/src/local-first/Owner.d.ts +70 -27
- package/dist/src/local-first/Owner.d.ts.map +1 -1
- package/dist/src/local-first/Owner.js +27 -14
- package/dist/src/local-first/Protocol.d.ts +58 -50
- package/dist/src/local-first/Protocol.d.ts.map +1 -1
- package/dist/src/local-first/Protocol.js +253 -155
- package/dist/src/local-first/Query.d.ts +133 -43
- package/dist/src/local-first/Query.d.ts.map +1 -1
- package/dist/src/local-first/Query.js +139 -90
- package/dist/src/local-first/Relay.d.ts +18 -38
- package/dist/src/local-first/Relay.d.ts.map +1 -1
- package/dist/src/local-first/Relay.js +59 -171
- package/dist/src/local-first/Schema.d.ts +139 -144
- package/dist/src/local-first/Schema.d.ts.map +1 -1
- package/dist/src/local-first/Schema.js +78 -163
- package/dist/src/local-first/Shared.d.ts +125 -0
- package/dist/src/local-first/Shared.d.ts.map +1 -0
- package/dist/src/local-first/Shared.js +569 -0
- package/dist/src/local-first/Storage.d.ts +50 -53
- package/dist/src/local-first/Storage.d.ts.map +1 -1
- package/dist/src/local-first/Storage.js +121 -173
- package/dist/src/local-first/Timestamp.d.ts +28 -35
- package/dist/src/local-first/Timestamp.d.ts.map +1 -1
- package/dist/src/local-first/Timestamp.js +24 -25
- package/dist/src/local-first/index.d.ts +2 -15
- package/dist/src/local-first/index.d.ts.map +1 -1
- package/dist/src/local-first/index.js +2 -15
- package/package.json +36 -26
- package/src/Array.ts +467 -106
- package/src/Assert.ts +87 -12
- package/src/BigInt.ts +7 -1
- package/src/Brand.ts +41 -12
- package/src/Buffer.ts +10 -4
- package/src/Cache.ts +11 -2
- package/src/Callbacks.ts +33 -23
- package/src/Console.ts +567 -178
- package/src/Crypto.ts +111 -62
- package/src/Eq.ts +30 -3
- package/src/Error.ts +50 -34
- package/src/Function.ts +140 -68
- package/src/Identicon.ts +7 -1
- package/src/Lookup.ts +415 -0
- package/src/Microtask.ts +58 -0
- package/src/Number.ts +40 -7
- package/src/Object.ts +155 -16
- package/src/Option.ts +74 -0
- package/src/Order.ts +11 -3
- package/src/Platform.ts +43 -7
- package/src/Polyfills.ts +465 -0
- package/src/Random.ts +25 -11
- package/src/Redacted.ts +8 -4
- package/src/Ref.ts +72 -21
- package/src/RefCount.ts +170 -0
- package/src/Relation.ts +188 -136
- package/src/Resource.ts +864 -0
- package/src/Result.ts +548 -381
- package/src/Schedule.ts +1471 -0
- package/src/Set.ts +247 -0
- package/src/Skiplist.ts +7 -1
- package/src/Sqlite.ts +409 -304
- package/src/Store.ts +94 -48
- package/src/String.ts +6 -0
- package/src/Task.ts +3685 -740
- package/src/Test.ts +162 -0
- package/src/Time.ts +348 -145
- package/src/Tracer.ts +54 -0
- package/src/Type.ts +1064 -630
- package/src/Types.ts +202 -7
- package/src/WebSocket.ts +311 -178
- package/src/Worker.ts +527 -147
- package/src/index.ts +74 -3
- package/src/local-first/Db.ts +871 -597
- package/src/local-first/Error.ts +17 -0
- package/src/local-first/Evolu.ts +884 -823
- package/src/local-first/LocalAuth.ts +10 -10
- package/src/local-first/Owner.ts +94 -42
- package/src/local-first/Protocol.ts +440 -303
- package/src/local-first/Query.ts +243 -194
- package/src/local-first/Relay.ts +91 -252
- package/src/local-first/Schema.ts +284 -394
- package/src/local-first/Shared.ts +932 -0
- package/src/local-first/Storage.ts +209 -282
- package/src/local-first/Timestamp.ts +38 -45
- package/src/local-first/index.ts +2 -16
- package/LICENSE +0 -21
- package/dist/src/Instances.d.ts +0 -34
- package/dist/src/Instances.d.ts.map +0 -1
- package/dist/src/Instances.js +0 -44
- package/dist/src/Resources.d.ts +0 -118
- package/dist/src/Resources.d.ts.map +0 -1
- package/dist/src/Resources.js +0 -197
- package/dist/src/local-first/Platform.d.ts +0 -25
- package/dist/src/local-first/Platform.d.ts.map +0 -1
- package/dist/src/local-first/Platform.js +0 -1
- package/dist/src/local-first/Public.d.ts +0 -22
- package/dist/src/local-first/Public.d.ts.map +0 -1
- package/dist/src/local-first/Public.js +0 -15
- package/dist/src/local-first/PublicKysely.d.ts +0 -148
- package/dist/src/local-first/PublicKysely.d.ts.map +0 -1
- package/dist/src/local-first/PublicKysely.js +0 -184
- package/dist/src/local-first/Sync.d.ts +0 -112
- package/dist/src/local-first/Sync.d.ts.map +0 -1
- package/dist/src/local-first/Sync.js +0 -529
- package/src/Instances.ts +0 -90
- package/src/Resources.ts +0 -367
- package/src/local-first/Platform.ts +0 -27
- package/src/local-first/Public.ts +0 -42
- package/src/local-first/PublicKysely.ts +0 -239
- package/src/local-first/Sync.ts +0 -960
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Public.d.ts","sourceRoot":"","sources":["../../../src/local-first/Public.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC5E,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAC5C,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAClE,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,YAAY,EACV,YAAY,EACZ,oBAAoB,EACpB,WAAW,EACX,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,SAAS,EACT,yBAAyB,EACzB,yBAAyB,GAC1B,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,cAAc,EACd,6BAA6B,EAC7B,mBAAmB,EACnB,cAAc,EACd,4BAA4B,GAC7B,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Public local-first API exported from "@evolu/common"
|
|
3
|
-
*
|
|
4
|
-
* This module provides the supported consumer-facing API for Evolu's
|
|
5
|
-
* local-first system: prefer importing from `@evolu/common` (this module) when
|
|
6
|
-
* using Evolu in applications. If you require access to lower level internals,
|
|
7
|
-
* consider importing from `@evolu/common/local-first`.
|
|
8
|
-
*
|
|
9
|
-
* @module
|
|
10
|
-
*/
|
|
11
|
-
export { createEvolu } from "./Evolu.js";
|
|
12
|
-
export * from "./LocalAuth.js";
|
|
13
|
-
export * from "./Owner.js";
|
|
14
|
-
export * as kysely from "./PublicKysely.js";
|
|
15
|
-
export { Timestamp, timestampBytesToTimestamp, timestampToTimestampBytes, } from "./Timestamp.js";
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { AliasableExpression, Expression, RawBuilder, SelectQueryNode, Simplify } from "kysely";
|
|
2
|
-
export { sql } from "kysely";
|
|
3
|
-
export type { NotNull } from "kysely";
|
|
4
|
-
/**
|
|
5
|
-
* A SQLite helper for aggregating a subquery into a JSON array.
|
|
6
|
-
*
|
|
7
|
-
* ### Examples
|
|
8
|
-
*
|
|
9
|
-
* ```ts
|
|
10
|
-
* import { kysely } from "@evolu/common";
|
|
11
|
-
*
|
|
12
|
-
* // TODO: Update for Evolu
|
|
13
|
-
* const result = await db
|
|
14
|
-
* .selectFrom("person")
|
|
15
|
-
* .select((eb) => [
|
|
16
|
-
* "id",
|
|
17
|
-
* kysely
|
|
18
|
-
* .jsonArrayFrom(
|
|
19
|
-
* eb
|
|
20
|
-
* .selectFrom("pet")
|
|
21
|
-
* .select(["pet.id as pet_id", "pet.name"])
|
|
22
|
-
* .whereRef("pet.owner_id", "=", "person.id")
|
|
23
|
-
* .orderBy("pet.name"),
|
|
24
|
-
* )
|
|
25
|
-
* .as("pets"),
|
|
26
|
-
* ])
|
|
27
|
-
* .execute();
|
|
28
|
-
*
|
|
29
|
-
* result[0]?.id;
|
|
30
|
-
* result[0]?.pets[0].pet_id;
|
|
31
|
-
* result[0]?.pets[0].name;
|
|
32
|
-
* ```
|
|
33
|
-
*
|
|
34
|
-
* The generated SQL (SQLite):
|
|
35
|
-
*
|
|
36
|
-
* ```sql
|
|
37
|
-
* select "id", (
|
|
38
|
-
* select coalesce(json_group_array(json_object(
|
|
39
|
-
* 'pet_id', "agg"."pet_id",
|
|
40
|
-
* 'name', "agg"."name"
|
|
41
|
-
* )), '[]') from (
|
|
42
|
-
* select "pet"."id" as "pet_id", "pet"."name"
|
|
43
|
-
* from "pet"
|
|
44
|
-
* where "pet"."owner_id" = "person"."id"
|
|
45
|
-
* order by "pet"."name"
|
|
46
|
-
* ) as "agg"
|
|
47
|
-
* ) as "pets"
|
|
48
|
-
* from "person"
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
|
-
export declare function jsonArrayFrom<O>(expr: SelectQueryBuilderExpression<O>): RawBuilder<Array<Simplify<O>>>;
|
|
52
|
-
/**
|
|
53
|
-
* A SQLite helper for turning a subquery into a JSON object.
|
|
54
|
-
*
|
|
55
|
-
* The subquery must only return one row.
|
|
56
|
-
*
|
|
57
|
-
* ### Examples
|
|
58
|
-
*
|
|
59
|
-
* ```ts
|
|
60
|
-
* import { kysely } from "@evolu/common";
|
|
61
|
-
*
|
|
62
|
-
* // TODO: Update for Evolu
|
|
63
|
-
* const result = await db
|
|
64
|
-
* .selectFrom("person")
|
|
65
|
-
* .select((eb) => [
|
|
66
|
-
* "id",
|
|
67
|
-
* jsonObjectFrom(
|
|
68
|
-
* eb
|
|
69
|
-
* .selectFrom("pet")
|
|
70
|
-
* .select(["pet.id as pet_id", "pet.name"])
|
|
71
|
-
* .whereRef("pet.owner_id", "=", "person.id")
|
|
72
|
-
* .where("pet.is_favorite", "=", true),
|
|
73
|
-
* ).as("favorite_pet"),
|
|
74
|
-
* ])
|
|
75
|
-
* .execute();
|
|
76
|
-
*
|
|
77
|
-
* result[0]?.id;
|
|
78
|
-
* result[0]?.favorite_pet?.pet_id;
|
|
79
|
-
* result[0]?.favorite_pet?.name;
|
|
80
|
-
* ```
|
|
81
|
-
*
|
|
82
|
-
* The generated SQL (SQLite):
|
|
83
|
-
*
|
|
84
|
-
* ```sql
|
|
85
|
-
* select "id", (
|
|
86
|
-
* select json_object(
|
|
87
|
-
* 'pet_id', "obj"."pet_id",
|
|
88
|
-
* 'name', "obj"."name"
|
|
89
|
-
* ) from (
|
|
90
|
-
* select "pet"."id" as "pet_id", "pet"."name"
|
|
91
|
-
* from "pet"
|
|
92
|
-
* where "pet"."owner_id" = "person"."id"
|
|
93
|
-
* and "pet"."is_favorite" = ?
|
|
94
|
-
* ) as obj
|
|
95
|
-
* ) as "favorite_pet"
|
|
96
|
-
* from "person";
|
|
97
|
-
* ```
|
|
98
|
-
*/
|
|
99
|
-
export declare function jsonObjectFrom<O>(expr: SelectQueryBuilderExpression<O>): RawBuilder<Simplify<O> | null>;
|
|
100
|
-
/**
|
|
101
|
-
* The SQLite `json_object` function.
|
|
102
|
-
*
|
|
103
|
-
* ### Examples
|
|
104
|
-
*
|
|
105
|
-
* ```ts
|
|
106
|
-
* import { kysely } from "@evolu/common";
|
|
107
|
-
*
|
|
108
|
-
* // TODO: Update for Evolu
|
|
109
|
-
* const result = await db
|
|
110
|
-
* .selectFrom("person")
|
|
111
|
-
* .select((eb) => [
|
|
112
|
-
* "id",
|
|
113
|
-
* kysely
|
|
114
|
-
* .jsonBuildObject({
|
|
115
|
-
* first: eb.ref("first_name"),
|
|
116
|
-
* last: eb.ref("last_name"),
|
|
117
|
-
* full: kysely.sql<string>`first_name || ' ' || last_name`,
|
|
118
|
-
* })
|
|
119
|
-
* .as("name"),
|
|
120
|
-
* ])
|
|
121
|
-
* .execute();
|
|
122
|
-
*
|
|
123
|
-
* result[0]?.id;
|
|
124
|
-
* result[0]?.name.first;
|
|
125
|
-
* result[0]?.name.last;
|
|
126
|
-
* result[0]?.name.full;
|
|
127
|
-
* ```
|
|
128
|
-
*
|
|
129
|
-
* The generated SQL (SQLite):
|
|
130
|
-
*
|
|
131
|
-
* ```sql
|
|
132
|
-
* select "id", json_object(
|
|
133
|
-
* 'first', first_name,
|
|
134
|
-
* 'last', last_name,
|
|
135
|
-
* 'full', "first_name" || ' ' || "last_name"
|
|
136
|
-
* ) as "name"
|
|
137
|
-
* from "person"
|
|
138
|
-
* ```
|
|
139
|
-
*/
|
|
140
|
-
export declare function jsonBuildObject<O extends Record<string, Expression<unknown>>>(obj: O): RawBuilder<Simplify<{
|
|
141
|
-
[K in keyof O]: O[K] extends Expression<infer V> ? V : never;
|
|
142
|
-
}>>;
|
|
143
|
-
interface SelectQueryBuilderExpression<O> extends AliasableExpression<O> {
|
|
144
|
-
get isSelectQueryBuilder(): true;
|
|
145
|
-
toOperationNode(): SelectQueryNode;
|
|
146
|
-
}
|
|
147
|
-
export declare function getJsonObjectArgs(node: SelectQueryNode, table: string): Array<Expression<unknown> | string>;
|
|
148
|
-
//# sourceMappingURL=PublicKysely.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PublicKysely.d.ts","sourceRoot":"","sources":["../../../src/local-first/PublicKysely.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAGnB,UAAU,EAGV,UAAU,EAEV,eAAe,EACf,QAAQ,EAIT,MAAM,QAAQ,CAAC;AAGhB,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAC7B,YAAY,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAGH,wBAAgB,aAAa,CAAC,CAAC,EAC3B,IAAI,EAAE,4BAA4B,CAAC,CAAC,CAAC,GACpC,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAIhC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAGH,wBAAgB,cAAc,CAAC,CAAC,EAC5B,IAAI,EAAE,4BAA4B,CAAC,CAAC,CAAC,GACpC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAIhC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAGH,wBAAgB,eAAe,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,EACzE,GAAG,EAAE,CAAC,GACL,UAAU,CACX,QAAQ,CAAC;KACN,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK;CAC7D,CAAC,CACH,CAIA;AAEH,UAAU,4BAA4B,CAAC,CAAC,CAAE,SAAQ,mBAAmB,CAAC,CAAC,CAAC;IACtE,IAAI,oBAAoB,IAAI,IAAI,CAAC;IACjC,eAAe,IAAI,eAAe,CAAC;CACpC;AAeD,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,eAAe,EACrB,KAAK,EAAE,MAAM,GACZ,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC,CAmBrC"}
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
import { AliasNode, ColumnNode, ExpressionWrapper, IdentifierNode, ReferenceNode, sql, TableNode, ValueNode, } from "kysely";
|
|
2
|
-
import { kyselyJsonIdentifier } from "./Query.js";
|
|
3
|
-
export { sql } from "kysely";
|
|
4
|
-
/**
|
|
5
|
-
* A SQLite helper for aggregating a subquery into a JSON array.
|
|
6
|
-
*
|
|
7
|
-
* ### Examples
|
|
8
|
-
*
|
|
9
|
-
* ```ts
|
|
10
|
-
* import { kysely } from "@evolu/common";
|
|
11
|
-
*
|
|
12
|
-
* // TODO: Update for Evolu
|
|
13
|
-
* const result = await db
|
|
14
|
-
* .selectFrom("person")
|
|
15
|
-
* .select((eb) => [
|
|
16
|
-
* "id",
|
|
17
|
-
* kysely
|
|
18
|
-
* .jsonArrayFrom(
|
|
19
|
-
* eb
|
|
20
|
-
* .selectFrom("pet")
|
|
21
|
-
* .select(["pet.id as pet_id", "pet.name"])
|
|
22
|
-
* .whereRef("pet.owner_id", "=", "person.id")
|
|
23
|
-
* .orderBy("pet.name"),
|
|
24
|
-
* )
|
|
25
|
-
* .as("pets"),
|
|
26
|
-
* ])
|
|
27
|
-
* .execute();
|
|
28
|
-
*
|
|
29
|
-
* result[0]?.id;
|
|
30
|
-
* result[0]?.pets[0].pet_id;
|
|
31
|
-
* result[0]?.pets[0].name;
|
|
32
|
-
* ```
|
|
33
|
-
*
|
|
34
|
-
* The generated SQL (SQLite):
|
|
35
|
-
*
|
|
36
|
-
* ```sql
|
|
37
|
-
* select "id", (
|
|
38
|
-
* select coalesce(json_group_array(json_object(
|
|
39
|
-
* 'pet_id', "agg"."pet_id",
|
|
40
|
-
* 'name', "agg"."name"
|
|
41
|
-
* )), '[]') from (
|
|
42
|
-
* select "pet"."id" as "pet_id", "pet"."name"
|
|
43
|
-
* from "pet"
|
|
44
|
-
* where "pet"."owner_id" = "person"."id"
|
|
45
|
-
* order by "pet"."name"
|
|
46
|
-
* ) as "agg"
|
|
47
|
-
* ) as "pets"
|
|
48
|
-
* from "person"
|
|
49
|
-
* ```
|
|
50
|
-
*/
|
|
51
|
-
// Kysely expects strict AST.
|
|
52
|
-
// prettier-ignore
|
|
53
|
-
export function jsonArrayFrom(expr) {
|
|
54
|
-
return sql `(select ${sql.lit(kyselyJsonIdentifier)} || coalesce(json_group_array(json_object(${sql.join(getSqliteJsonObjectArgs(expr.toOperationNode(), 'agg'))})), '[]') from ${expr} as agg)`;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* A SQLite helper for turning a subquery into a JSON object.
|
|
58
|
-
*
|
|
59
|
-
* The subquery must only return one row.
|
|
60
|
-
*
|
|
61
|
-
* ### Examples
|
|
62
|
-
*
|
|
63
|
-
* ```ts
|
|
64
|
-
* import { kysely } from "@evolu/common";
|
|
65
|
-
*
|
|
66
|
-
* // TODO: Update for Evolu
|
|
67
|
-
* const result = await db
|
|
68
|
-
* .selectFrom("person")
|
|
69
|
-
* .select((eb) => [
|
|
70
|
-
* "id",
|
|
71
|
-
* jsonObjectFrom(
|
|
72
|
-
* eb
|
|
73
|
-
* .selectFrom("pet")
|
|
74
|
-
* .select(["pet.id as pet_id", "pet.name"])
|
|
75
|
-
* .whereRef("pet.owner_id", "=", "person.id")
|
|
76
|
-
* .where("pet.is_favorite", "=", true),
|
|
77
|
-
* ).as("favorite_pet"),
|
|
78
|
-
* ])
|
|
79
|
-
* .execute();
|
|
80
|
-
*
|
|
81
|
-
* result[0]?.id;
|
|
82
|
-
* result[0]?.favorite_pet?.pet_id;
|
|
83
|
-
* result[0]?.favorite_pet?.name;
|
|
84
|
-
* ```
|
|
85
|
-
*
|
|
86
|
-
* The generated SQL (SQLite):
|
|
87
|
-
*
|
|
88
|
-
* ```sql
|
|
89
|
-
* select "id", (
|
|
90
|
-
* select json_object(
|
|
91
|
-
* 'pet_id', "obj"."pet_id",
|
|
92
|
-
* 'name', "obj"."name"
|
|
93
|
-
* ) from (
|
|
94
|
-
* select "pet"."id" as "pet_id", "pet"."name"
|
|
95
|
-
* from "pet"
|
|
96
|
-
* where "pet"."owner_id" = "person"."id"
|
|
97
|
-
* and "pet"."is_favorite" = ?
|
|
98
|
-
* ) as obj
|
|
99
|
-
* ) as "favorite_pet"
|
|
100
|
-
* from "person";
|
|
101
|
-
* ```
|
|
102
|
-
*/
|
|
103
|
-
// Kysely expects strict AST.
|
|
104
|
-
// prettier-ignore
|
|
105
|
-
export function jsonObjectFrom(expr) {
|
|
106
|
-
return sql `(select ${sql.lit(kyselyJsonIdentifier)} || json_object(${sql.join(getSqliteJsonObjectArgs(expr.toOperationNode(), 'obj'))}) from ${expr} as obj)`;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* The SQLite `json_object` function.
|
|
110
|
-
*
|
|
111
|
-
* ### Examples
|
|
112
|
-
*
|
|
113
|
-
* ```ts
|
|
114
|
-
* import { kysely } from "@evolu/common";
|
|
115
|
-
*
|
|
116
|
-
* // TODO: Update for Evolu
|
|
117
|
-
* const result = await db
|
|
118
|
-
* .selectFrom("person")
|
|
119
|
-
* .select((eb) => [
|
|
120
|
-
* "id",
|
|
121
|
-
* kysely
|
|
122
|
-
* .jsonBuildObject({
|
|
123
|
-
* first: eb.ref("first_name"),
|
|
124
|
-
* last: eb.ref("last_name"),
|
|
125
|
-
* full: kysely.sql<string>`first_name || ' ' || last_name`,
|
|
126
|
-
* })
|
|
127
|
-
* .as("name"),
|
|
128
|
-
* ])
|
|
129
|
-
* .execute();
|
|
130
|
-
*
|
|
131
|
-
* result[0]?.id;
|
|
132
|
-
* result[0]?.name.first;
|
|
133
|
-
* result[0]?.name.last;
|
|
134
|
-
* result[0]?.name.full;
|
|
135
|
-
* ```
|
|
136
|
-
*
|
|
137
|
-
* The generated SQL (SQLite):
|
|
138
|
-
*
|
|
139
|
-
* ```sql
|
|
140
|
-
* select "id", json_object(
|
|
141
|
-
* 'first', first_name,
|
|
142
|
-
* 'last', last_name,
|
|
143
|
-
* 'full', "first_name" || ' ' || "last_name"
|
|
144
|
-
* ) as "name"
|
|
145
|
-
* from "person"
|
|
146
|
-
* ```
|
|
147
|
-
*/
|
|
148
|
-
// Kysely expects strict AST.
|
|
149
|
-
// prettier-ignore
|
|
150
|
-
export function jsonBuildObject(obj) {
|
|
151
|
-
return sql `${sql.lit(kyselyJsonIdentifier)} || json_object(${sql.join(Object.keys(obj).flatMap((k) => [sql.lit(k), obj[k]]))})`;
|
|
152
|
-
}
|
|
153
|
-
function getSqliteJsonObjectArgs(node, table) {
|
|
154
|
-
try {
|
|
155
|
-
return getJsonObjectArgs(node, table);
|
|
156
|
-
}
|
|
157
|
-
catch {
|
|
158
|
-
throw new Error("SQLite jsonArrayFrom and jsonObjectFrom functions can only handle explicit selections due to limitations of the json_object function. selectAll() is not allowed in the subquery.");
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
export function getJsonObjectArgs(node, table) {
|
|
162
|
-
const args = [];
|
|
163
|
-
for (const { selection: s } of node.selections ?? []) {
|
|
164
|
-
if (ReferenceNode.is(s) && ColumnNode.is(s.column)) {
|
|
165
|
-
args.push(colName(s.column.column.name), colRef(table, s.column.column.name));
|
|
166
|
-
}
|
|
167
|
-
else if (ColumnNode.is(s)) {
|
|
168
|
-
args.push(colName(s.column.name), colRef(table, s.column.name));
|
|
169
|
-
}
|
|
170
|
-
else if (AliasNode.is(s) && IdentifierNode.is(s.alias)) {
|
|
171
|
-
args.push(colName(s.alias.name), colRef(table, s.alias.name));
|
|
172
|
-
}
|
|
173
|
-
else {
|
|
174
|
-
throw new Error(`can't extract column names from the select query node`);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
return args;
|
|
178
|
-
}
|
|
179
|
-
function colName(col) {
|
|
180
|
-
return new ExpressionWrapper(ValueNode.createImmediate(col));
|
|
181
|
-
}
|
|
182
|
-
function colRef(table, col) {
|
|
183
|
-
return new ExpressionWrapper(ReferenceNode.create(ColumnNode.create(col), TableNode.create(table)));
|
|
184
|
-
}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { NonEmptyReadonlyArray } from "../Array.js";
|
|
2
|
-
import { ConsoleDep } from "../Console.js";
|
|
3
|
-
import { RandomBytesDep, SymmetricCryptoDecryptError, SymmetricCryptoDep } from "../Crypto.js";
|
|
4
|
-
import { TransferableError } from "../Error.js";
|
|
5
|
-
import { RandomDep } from "../Random.js";
|
|
6
|
-
import { Result } from "../Result.js";
|
|
7
|
-
import { SqliteDep, SqliteError } from "../Sqlite.js";
|
|
8
|
-
import { TimeDep } from "../Time.js";
|
|
9
|
-
import { CreateWebSocketDep } from "../WebSocket.js";
|
|
10
|
-
import { AppOwner, AppOwnerDep, Owner, OwnerTransport, ReadonlyOwner } from "./Owner.js";
|
|
11
|
-
import { ProtocolError, ProtocolInvalidDataError, ProtocolTimestampMismatchError } from "./Protocol.js";
|
|
12
|
-
import { DbSchemaDep, MutationChange } from "./Schema.js";
|
|
13
|
-
import { BaseSqliteStorage, Storage } from "./Storage.js";
|
|
14
|
-
import { Millis, Timestamp, TimestampConfigDep, TimestampCounterOverflowError, TimestampDriftError, TimestampTimeOutOfRangeError } from "./Timestamp.js";
|
|
15
|
-
export interface Sync extends Disposable {
|
|
16
|
-
/**
|
|
17
|
-
* Assigns or removes an owner to/from transports with reference counting.
|
|
18
|
-
*
|
|
19
|
-
* Owners are only synced if assigned to at least one transport. Uses
|
|
20
|
-
* `owner.transports` or falls back to {@link SyncConfig} transports. Multiple
|
|
21
|
-
* calls increment/decrement reference counts (useful for React Hooks).
|
|
22
|
-
*/
|
|
23
|
-
readonly useOwner: (use: boolean, owner: SyncOwner) => void;
|
|
24
|
-
readonly applyChanges: (changes: NonEmptyReadonlyArray<MutationChange>) => Result<void, SqliteError | TimestampCounterOverflowError | TimestampDriftError | TimestampTimeOutOfRangeError>;
|
|
25
|
-
}
|
|
26
|
-
export interface SyncDep {
|
|
27
|
-
readonly sync: Sync;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Represents an owner for sync operations.
|
|
31
|
-
*
|
|
32
|
-
* Includes readonly owner fields plus optional write key (for clients that
|
|
33
|
-
* write) and optional transports to override SyncConfig transports per owner.
|
|
34
|
-
*/
|
|
35
|
-
export interface SyncOwner extends ReadonlyOwner {
|
|
36
|
-
readonly writeKey?: Owner["writeKey"];
|
|
37
|
-
readonly transports?: ReadonlyArray<OwnerTransport>;
|
|
38
|
-
}
|
|
39
|
-
export interface SyncConfig {
|
|
40
|
-
readonly appOwner: AppOwner;
|
|
41
|
-
readonly transports: ReadonlyArray<OwnerTransport>;
|
|
42
|
-
/**
|
|
43
|
-
* Delay in milliseconds before disposing unused WebSocket connections.
|
|
44
|
-
* Defaults to 100ms.
|
|
45
|
-
*/
|
|
46
|
-
readonly disposalDelayMs?: number;
|
|
47
|
-
readonly onError: (error: ProtocolError | ProtocolInvalidDataError | ProtocolTimestampMismatchError | SqliteError | SymmetricCryptoDecryptError | TimestampCounterOverflowError | TimestampDriftError | TimestampTimeOutOfRangeError | TransferableError) => void;
|
|
48
|
-
readonly onReceive: () => void;
|
|
49
|
-
}
|
|
50
|
-
export declare const createSync: (deps: ClockDep & ConsoleDep & CreateWebSocketDep & DbSchemaDep & RandomBytesDep & RandomDep & SqliteDep & SymmetricCryptoDep & TimeDep & TimestampConfigDep) => (config: SyncConfig) => Result<Sync, SqliteError>;
|
|
51
|
-
export interface ClockDep {
|
|
52
|
-
readonly clock: Clock;
|
|
53
|
-
}
|
|
54
|
-
export interface Clock {
|
|
55
|
-
readonly get: () => Timestamp;
|
|
56
|
-
readonly save: (timestamp: Timestamp) => Result<void, SqliteError>;
|
|
57
|
-
}
|
|
58
|
-
export declare const createClock: (deps: RandomBytesDep & SqliteDep) => (initialTimestamp?: Timestamp) => Clock;
|
|
59
|
-
export interface ClientStorage extends Storage, BaseSqliteStorage {
|
|
60
|
-
}
|
|
61
|
-
export interface ClientStorageDep {
|
|
62
|
-
readonly storage: ClientStorage;
|
|
63
|
-
}
|
|
64
|
-
export declare const applyLocalOnlyChange: (deps: SqliteDep & TimeDep & AppOwnerDep) => (change: MutationChange) => Result<void, SqliteError>;
|
|
65
|
-
/**
|
|
66
|
-
* Attempts to apply quarantined messages that may now be valid after a schema
|
|
67
|
-
* update. Messages are quarantined when they reference tables or columns that
|
|
68
|
-
* don't exist in the current schema (e.g., from a newer app version).
|
|
69
|
-
*/
|
|
70
|
-
export declare const tryApplyQuarantinedMessages: (deps: DbSchemaDep & SqliteDep) => () => Result<void, SqliteError>;
|
|
71
|
-
/**
|
|
72
|
-
* TODO: Rework for the new owners API.
|
|
73
|
-
*
|
|
74
|
-
* The possible states of a synchronization process. The `SyncState` can be one
|
|
75
|
-
* of the following:
|
|
76
|
-
*
|
|
77
|
-
* - {@link SyncStateInitial}
|
|
78
|
-
* - {@link SyncStateIsSyncing}
|
|
79
|
-
* - {@link SyncStateIsSynced}
|
|
80
|
-
* - {@link SyncStateIsNotSynced}
|
|
81
|
-
*/
|
|
82
|
-
export type SyncState = SyncStateInitial | SyncStateIsSyncing | SyncStateIsSynced | SyncStateIsNotSynced;
|
|
83
|
-
/**
|
|
84
|
-
* The initial synchronization state when the app starts. In this state, the app
|
|
85
|
-
* needs to determine whether the data is synced.
|
|
86
|
-
*/
|
|
87
|
-
export interface SyncStateInitial {
|
|
88
|
-
readonly type: "SyncStateInitial";
|
|
89
|
-
}
|
|
90
|
-
export interface SyncStateIsSyncing {
|
|
91
|
-
readonly type: "SyncStateIsSyncing";
|
|
92
|
-
}
|
|
93
|
-
export interface SyncStateIsSynced {
|
|
94
|
-
readonly type: "SyncStateIsSynced";
|
|
95
|
-
readonly time: Millis;
|
|
96
|
-
}
|
|
97
|
-
export interface SyncStateIsNotSynced {
|
|
98
|
-
readonly type: "SyncStateIsNotSynced";
|
|
99
|
-
readonly error: NetworkError | ServerError | PaymentRequiredError;
|
|
100
|
-
}
|
|
101
|
-
export interface NetworkError {
|
|
102
|
-
readonly type: "NetworkError";
|
|
103
|
-
}
|
|
104
|
-
export interface ServerError {
|
|
105
|
-
readonly type: "ServerError";
|
|
106
|
-
readonly status: number;
|
|
107
|
-
}
|
|
108
|
-
export interface PaymentRequiredError {
|
|
109
|
-
readonly type: "PaymentRequiredError";
|
|
110
|
-
}
|
|
111
|
-
export declare const initialSyncState: SyncStateInitial;
|
|
112
|
-
//# sourceMappingURL=Sync.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Sync.d.ts","sourceRoot":"","sources":["../../../src/local-first/Sync.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,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