@evolu/common 8.0.0-next.4 → 8.0.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/dist/src/Array.d.ts +279 -173
- package/dist/src/Array.d.ts.map +1 -1
- package/dist/src/Array.js +105 -101
- package/dist/src/Assert.d.ts +44 -44
- package/dist/src/Assert.d.ts.map +1 -1
- package/dist/src/Assert.js +44 -32
- package/dist/src/BigInt.d.ts +6 -3
- package/dist/src/BigInt.d.ts.map +1 -1
- package/dist/src/BigInt.js +5 -2
- package/dist/src/Brand.d.ts +27 -40
- package/dist/src/Brand.d.ts.map +1 -1
- package/dist/src/Buffer.d.ts +27 -11
- package/dist/src/Buffer.d.ts.map +1 -1
- package/dist/src/Cache.d.ts +9 -4
- package/dist/src/Cache.d.ts.map +1 -1
- package/dist/src/Cache.js +8 -3
- package/dist/src/Callbacks.d.ts +30 -19
- package/dist/src/Callbacks.d.ts.map +1 -1
- package/dist/src/Console.d.ts +145 -66
- package/dist/src/Console.d.ts.map +1 -1
- package/dist/src/Console.js +91 -43
- package/dist/src/Crypto.d.ts +85 -42
- package/dist/src/Crypto.d.ts.map +1 -1
- package/dist/src/Crypto.js +44 -20
- package/dist/src/Eq.d.ts +87 -21
- package/dist/src/Eq.d.ts.map +1 -1
- package/dist/src/Eq.js +67 -19
- package/dist/src/Error.d.ts +5 -3
- package/dist/src/Error.d.ts.map +1 -1
- package/dist/src/Error.js +16 -0
- package/dist/src/Function.d.ts +119 -58
- package/dist/src/Function.d.ts.map +1 -1
- package/dist/src/Function.js +86 -43
- package/dist/src/Http.d.ts +394 -0
- package/dist/src/Http.d.ts.map +1 -0
- package/dist/src/Http.js +102 -0
- package/dist/src/Identicon.d.ts +16 -7
- package/dist/src/Identicon.d.ts.map +1 -1
- package/dist/src/Identicon.js +14 -5
- package/dist/src/LeakDetector.d.ts +88 -0
- package/dist/src/LeakDetector.d.ts.map +1 -0
- package/dist/src/LeakDetector.js +86 -0
- package/dist/src/LockManager.d.ts +18 -9
- package/dist/src/LockManager.d.ts.map +1 -1
- package/dist/src/LockManager.js +7 -8
- package/dist/src/Lookup.d.ts +43 -13
- package/dist/src/Lookup.d.ts.map +1 -1
- package/dist/src/Lookup.js +28 -8
- package/dist/src/Microtask.d.ts +1 -1
- package/dist/src/Microtask.d.ts.map +1 -1
- package/dist/src/Microtask.js +3 -7
- package/dist/src/Number.d.ts +49 -13
- package/dist/src/Number.d.ts.map +1 -1
- package/dist/src/Number.js +34 -5
- package/dist/src/Object.d.ts +160 -40
- package/dist/src/Object.d.ts.map +1 -1
- package/dist/src/Object.js +92 -46
- package/dist/src/Option.d.ts +10 -7
- package/dist/src/Option.d.ts.map +1 -1
- package/dist/src/Option.js +9 -6
- package/dist/src/Order.d.ts +21 -21
- package/dist/src/Order.d.ts.map +1 -1
- package/dist/src/Order.js +18 -21
- package/dist/src/Platform.d.ts +31 -0
- package/dist/src/Platform.d.ts.map +1 -1
- package/dist/src/Platform.js +98 -0
- package/dist/src/Random.d.ts +32 -17
- package/dist/src/Random.d.ts.map +1 -1
- package/dist/src/Random.js +12 -8
- package/dist/src/Redacted.d.ts +43 -29
- package/dist/src/Redacted.d.ts.map +1 -1
- package/dist/src/Redacted.js +14 -3
- package/dist/src/Ref.d.ts +11 -3
- package/dist/src/Ref.d.ts.map +1 -1
- package/dist/src/Ref.js +2 -2
- package/dist/src/RefCount.d.ts +2 -6
- package/dist/src/RefCount.d.ts.map +1 -1
- package/dist/src/RefCount.js +33 -90
- package/dist/src/Relation.d.ts +70 -5
- package/dist/src/Relation.d.ts.map +1 -1
- package/dist/src/Relation.js +77 -2
- package/dist/src/Resource.d.ts +590 -155
- package/dist/src/Resource.d.ts.map +1 -1
- package/dist/src/Resource.js +592 -343
- package/dist/src/Result.d.ts +838 -191
- package/dist/src/Result.d.ts.map +1 -1
- package/dist/src/Result.js +163 -102
- package/dist/src/Schedule.d.ts +684 -231
- package/dist/src/Schedule.d.ts.map +1 -1
- package/dist/src/Schedule.js +766 -295
- package/dist/src/Set.d.ts +89 -40
- package/dist/src/Set.d.ts.map +1 -1
- package/dist/src/Set.js +50 -29
- package/dist/src/Sqlite.d.ts +29 -72
- package/dist/src/Sqlite.d.ts.map +1 -1
- package/dist/src/Sqlite.js +41 -46
- package/dist/src/StackTrace.d.ts +40 -0
- package/dist/src/StackTrace.d.ts.map +1 -0
- package/dist/src/StackTrace.js +140 -0
- package/dist/src/Store.d.ts +5 -4
- package/dist/src/Store.d.ts.map +1 -1
- package/dist/src/Store.js +5 -4
- package/dist/src/String.d.ts +7 -1
- package/dist/src/String.d.ts.map +1 -1
- package/dist/src/String.js +20 -7
- package/dist/src/Task.d.ts +3572 -1770
- package/dist/src/Task.d.ts.map +1 -1
- package/dist/src/Task.js +1879 -1274
- package/dist/src/Test.d.ts +17 -125
- package/dist/src/Test.d.ts.map +1 -1
- package/dist/src/Test.js +17 -68
- package/dist/src/Time.d.ts +108 -49
- package/dist/src/Time.d.ts.map +1 -1
- package/dist/src/Time.js +172 -73
- package/dist/src/Type.d.ts +3542 -1926
- package/dist/src/Type.d.ts.map +1 -1
- package/dist/src/Type.js +3070 -1784
- package/dist/src/Types.d.ts +200 -108
- package/dist/src/Types.d.ts.map +1 -1
- package/dist/src/Types.js +39 -8
- package/dist/src/WebSocket.d.ts +48 -23
- package/dist/src/WebSocket.d.ts.map +1 -1
- package/dist/src/WebSocket.js +15 -6
- package/dist/src/Worker.d.ts +94 -36
- package/dist/src/Worker.d.ts.map +1 -1
- package/dist/src/Worker.js +58 -24
- package/dist/src/index.d.ts +55 -52
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +3 -1
- package/dist/src/intl/cs.d.ts +94 -0
- package/dist/src/intl/cs.d.ts.map +1 -0
- package/dist/src/intl/cs.js +220 -0
- package/dist/src/intl/index.d.ts +7 -0
- package/dist/src/intl/index.d.ts.map +1 -0
- package/dist/src/intl/index.js +6 -0
- package/dist/src/local-first/Db.d.ts +12 -8
- package/dist/src/local-first/Db.d.ts.map +1 -1
- package/dist/src/local-first/Db.js +109 -132
- package/dist/src/local-first/Error.d.ts +4 -4
- package/dist/src/local-first/Evolu.d.ts +338 -92
- package/dist/src/local-first/Evolu.d.ts.map +1 -1
- package/dist/src/local-first/Evolu.js +47 -55
- package/dist/src/local-first/LocalAuth.d.ts +4 -4
- package/dist/src/local-first/LocalAuth.d.ts.map +1 -1
- package/dist/src/local-first/Owner.d.ts +61 -24
- package/dist/src/local-first/Owner.d.ts.map +1 -1
- package/dist/src/local-first/Owner.js +45 -8
- package/dist/src/local-first/Protocol.d.ts +44 -31
- package/dist/src/local-first/Protocol.d.ts.map +1 -1
- package/dist/src/local-first/Protocol.js +36 -13
- package/dist/src/local-first/Query.d.ts +147 -62
- package/dist/src/local-first/Query.d.ts.map +1 -1
- package/dist/src/local-first/Query.js +112 -58
- package/dist/src/local-first/Relay.d.ts +44 -14
- package/dist/src/local-first/Relay.d.ts.map +1 -1
- package/dist/src/local-first/Schema.d.ts +92 -41
- package/dist/src/local-first/Schema.d.ts.map +1 -1
- package/dist/src/local-first/Schema.js +25 -8
- package/dist/src/local-first/Shared.d.ts +23 -21
- package/dist/src/local-first/Shared.d.ts.map +1 -1
- package/dist/src/local-first/Shared.js +100 -57
- package/dist/src/local-first/Storage.d.ts +53 -32
- package/dist/src/local-first/Storage.d.ts.map +1 -1
- package/dist/src/local-first/Storage.js +194 -234
- package/dist/src/local-first/Timestamp.d.ts +21 -21
- package/dist/src/local-first/Timestamp.d.ts.map +1 -1
- package/dist/src/local-first/Timestamp.js +2 -2
- package/dist/src/local-first/index.d.ts +11 -11
- package/package.json +14 -13
- package/src/Array.ts +306 -205
- package/src/Assert.ts +54 -69
- package/src/BigInt.ts +6 -3
- package/src/Brand.ts +27 -40
- package/src/Buffer.ts +28 -12
- package/src/Cache.ts +9 -4
- package/src/Callbacks.ts +30 -19
- package/src/Console.ts +156 -84
- package/src/Crypto.ts +83 -41
- package/src/Eq.ts +95 -22
- package/src/Error.ts +8 -4
- package/src/Function.ts +167 -59
- package/src/Http.ts +549 -0
- package/src/Identicon.ts +16 -7
- package/src/LeakDetector.ts +182 -0
- package/src/LockManager.ts +43 -39
- package/src/Lookup.ts +62 -28
- package/src/Microtask.ts +19 -23
- package/src/Number.ts +64 -12
- package/src/Object.ts +173 -49
- package/src/Option.ts +10 -7
- package/src/Order.ts +23 -21
- package/src/Platform.ts +136 -0
- package/src/Polyfills.ts +6 -12
- package/src/Random.ts +32 -19
- package/src/Redacted.ts +44 -30
- package/src/Ref.ts +14 -6
- package/src/RefCount.ts +38 -80
- package/src/Relation.ts +202 -10
- package/src/Resource.ts +1199 -591
- package/src/Result.ts +930 -271
- package/src/Schedule.ts +859 -343
- package/src/Set.ts +89 -40
- package/src/Sqlite.ts +144 -138
- package/src/StackTrace.ts +230 -0
- package/src/Store.ts +8 -7
- package/src/String.ts +22 -5
- package/src/Task.ts +5101 -2832
- package/src/Test.ts +20 -168
- package/src/Time.ts +293 -90
- package/src/Type.ts +10034 -4117
- package/src/Types.ts +227 -110
- package/src/WebSocket.ts +64 -36
- package/src/Worker.ts +180 -72
- package/src/index.ts +55 -52
- package/src/intl/cs.ts +388 -0
- package/src/intl/index.ts +7 -0
- package/src/local-first/Db.ts +152 -179
- package/src/local-first/Error.ts +4 -4
- package/src/local-first/Evolu.ts +495 -250
- package/src/local-first/LocalAuth.ts +6 -12
- package/src/local-first/Owner.ts +58 -21
- package/src/local-first/Protocol.ts +49 -31
- package/src/local-first/Query.ts +146 -61
- package/src/local-first/Relay.ts +51 -21
- package/src/local-first/Schema.ts +109 -51
- package/src/local-first/Shared.ts +266 -226
- package/src/local-first/Storage.ts +266 -264
- package/src/local-first/Timestamp.ts +25 -18
- package/src/local-first/index.ts +11 -11
- package/dist/src/Skiplist.d.ts +0 -28
- package/dist/src/Skiplist.d.ts.map +0 -1
- package/dist/src/Skiplist.js +0 -64
- package/dist/src/Tracer.d.ts +0 -48
- package/dist/src/Tracer.d.ts.map +0 -1
- package/dist/src/Tracer.js +0 -6
- package/src/Skiplist.ts +0 -108
- package/src/Tracer.ts +0 -54
package/dist/src/Set.d.ts
CHANGED
|
@@ -8,32 +8,37 @@
|
|
|
8
8
|
* Use {@link isNonEmptySet} to narrow to {@link NonEmptyReadonlySet} before
|
|
9
9
|
* calling functions like {@link firstInSet} that require a non-empty set.
|
|
10
10
|
*
|
|
11
|
-
* ###
|
|
11
|
+
* ### Composing immutable and native operations
|
|
12
12
|
*
|
|
13
13
|
* ```ts
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* const
|
|
24
|
-
* const
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* const
|
|
14
|
+
* import {
|
|
15
|
+
* addToSet,
|
|
16
|
+
* deleteFromSet,
|
|
17
|
+
* filterSet,
|
|
18
|
+
* firstInSet,
|
|
19
|
+
* isNonEmptySet,
|
|
20
|
+
* mapSet,
|
|
21
|
+
* } from "@evolu/common";
|
|
22
|
+
*
|
|
23
|
+
* const values = addToSet(new Set([1, 2]), 3);
|
|
24
|
+
* const withoutOne = deleteFromSet(values, 1);
|
|
25
|
+
* const doubled = mapSet(withoutOne, (x) => x * 2);
|
|
26
|
+
* const atLeastFour = filterSet(doubled, (x) => x >= 4);
|
|
27
|
+
*
|
|
28
|
+
* // Evolu's readonly results compose with native Set operations.
|
|
29
|
+
* const union = atLeastFour.union(new Set([6, 8]));
|
|
30
|
+
* const intersection = union.intersection(new Set([4, 6, 8, 10]));
|
|
31
|
+
* const difference = intersection.difference(new Set([4]));
|
|
32
|
+
*
|
|
33
|
+
* if (!isNonEmptySet(difference)) throw new Error("Expected values");
|
|
34
|
+
* expect(firstInSet(difference)).toBe(6);
|
|
30
35
|
* ```
|
|
31
36
|
*
|
|
32
37
|
* @module
|
|
33
38
|
*/
|
|
34
|
-
import type { NonEmptyReadonlyArray } from "./Array.
|
|
35
|
-
import type { Brand } from "./Brand.
|
|
36
|
-
import type { PredicateWithIndex, RefinementWithIndex } from "./Types.
|
|
39
|
+
import type { NonEmptyReadonlyArray } from "./Array.ts";
|
|
40
|
+
import type { Brand } from "./Brand.ts";
|
|
41
|
+
import type { PredicateWithIndex, RefinementWithIndex } from "./Types.ts";
|
|
37
42
|
/**
|
|
38
43
|
* An empty readonly set.
|
|
39
44
|
*
|
|
@@ -47,11 +52,17 @@ export declare const emptySet: ReadonlySet<never>;
|
|
|
47
52
|
*
|
|
48
53
|
* Preserves non-empty type when the input array is non-empty.
|
|
49
54
|
*
|
|
50
|
-
* ###
|
|
55
|
+
* ### Preserving non-empty inputs
|
|
51
56
|
*
|
|
52
57
|
* ```ts
|
|
53
|
-
* createSet
|
|
54
|
-
*
|
|
58
|
+
* import { createSet, type NonEmptyReadonlySet } from "@evolu/common";
|
|
59
|
+
*
|
|
60
|
+
* const values = createSet([1, 2, 3]);
|
|
61
|
+
* const empty = createSet([] as ReadonlyArray<number>);
|
|
62
|
+
*
|
|
63
|
+
* expectTypeOf(values).toEqualTypeOf<NonEmptyReadonlySet<number>>();
|
|
64
|
+
* expectTypeOf(empty).toEqualTypeOf<ReadonlySet<number>>();
|
|
65
|
+
* expect(values).toEqual(new Set([1, 2, 3]));
|
|
55
66
|
* ```
|
|
56
67
|
*
|
|
57
68
|
* @group Constructors
|
|
@@ -84,13 +95,16 @@ export type NonEmptyReadonlySet<T> = ReadonlySet<T> & Brand<"NonEmpty">;
|
|
|
84
95
|
* negated guard is better than `.size === 0` for early returns because
|
|
85
96
|
* TypeScript narrows the type after the check.
|
|
86
97
|
*
|
|
87
|
-
* ###
|
|
98
|
+
* ### Narrowing before access
|
|
88
99
|
*
|
|
89
100
|
* ```ts
|
|
101
|
+
* import { isNonEmptySet, type NonEmptyReadonlySet } from "@evolu/common";
|
|
102
|
+
*
|
|
90
103
|
* const set: ReadonlySet<number> = new Set([1, 2, 3]);
|
|
91
|
-
* if (isNonEmptySet(set))
|
|
92
|
-
*
|
|
93
|
-
*
|
|
104
|
+
* if (!isNonEmptySet(set)) throw new Error("Expected a non-empty set");
|
|
105
|
+
*
|
|
106
|
+
* expectTypeOf(set).toEqualTypeOf<NonEmptyReadonlySet<number>>();
|
|
107
|
+
* expect(set.size).toBe(3);
|
|
94
108
|
* ```
|
|
95
109
|
*
|
|
96
110
|
* @group Type guards
|
|
@@ -102,11 +116,18 @@ export declare const isNonEmptySet: <T>(set: ReadonlySet<T>) => set is NonEmptyR
|
|
|
102
116
|
* If the item already exists, returns a new set with the same elements (still a
|
|
103
117
|
* new reference for change detection).
|
|
104
118
|
*
|
|
105
|
-
* ###
|
|
119
|
+
* ### Adding without mutation
|
|
106
120
|
*
|
|
107
121
|
* ```ts
|
|
108
|
-
*
|
|
109
|
-
*
|
|
122
|
+
* import { addToSet, type NonEmptyReadonlySet } from "@evolu/common";
|
|
123
|
+
*
|
|
124
|
+
* const original: ReadonlySet<number> = new Set([1, 2]);
|
|
125
|
+
* const added = addToSet(original, 3);
|
|
126
|
+
* const unchanged = addToSet(original, 2);
|
|
127
|
+
*
|
|
128
|
+
* expectTypeOf(added).toEqualTypeOf<NonEmptyReadonlySet<number>>();
|
|
129
|
+
* expect(added).toEqual(new Set([1, 2, 3]));
|
|
130
|
+
* expect(unchanged).not.toBe(original);
|
|
110
131
|
* ```
|
|
111
132
|
*
|
|
112
133
|
* @group Transformations
|
|
@@ -118,11 +139,14 @@ export declare const addToSet: <T>(set: ReadonlySet<T>, item: T) => NonEmptyRead
|
|
|
118
139
|
* If the item doesn't exist, returns a new set with the same elements (still a
|
|
119
140
|
* new reference for change detection).
|
|
120
141
|
*
|
|
121
|
-
* ###
|
|
142
|
+
* ### Deleting without mutation
|
|
122
143
|
*
|
|
123
144
|
* ```ts
|
|
124
|
-
* deleteFromSet
|
|
125
|
-
*
|
|
145
|
+
* import { deleteFromSet } from "@evolu/common";
|
|
146
|
+
*
|
|
147
|
+
* const original = new Set([1, 2, 3]);
|
|
148
|
+
* expect(deleteFromSet(original, 2)).toEqual(new Set([1, 3]));
|
|
149
|
+
* expect(deleteFromSet(original, 5)).not.toBe(original);
|
|
126
150
|
* ```
|
|
127
151
|
*
|
|
128
152
|
* @group Transformations
|
|
@@ -136,11 +160,22 @@ export declare const deleteFromSet: <T>(set: ReadonlySet<T>, item: T) => Readonl
|
|
|
136
160
|
* Note: If the mapper produces duplicate values, the resulting set will have
|
|
137
161
|
* fewer elements.
|
|
138
162
|
*
|
|
139
|
-
* ###
|
|
163
|
+
* ### Mapping non-empty sets
|
|
140
164
|
*
|
|
141
165
|
* ```ts
|
|
142
|
-
*
|
|
143
|
-
*
|
|
166
|
+
* import {
|
|
167
|
+
* createSet,
|
|
168
|
+
* mapSet,
|
|
169
|
+
* type NonEmptyReadonlySet,
|
|
170
|
+
* } from "@evolu/common";
|
|
171
|
+
*
|
|
172
|
+
* const original = createSet([1, 2, 3]);
|
|
173
|
+
* const doubled = mapSet(original, (x) => x * 2);
|
|
174
|
+
* const parity = mapSet(original, (x) => x % 2);
|
|
175
|
+
*
|
|
176
|
+
* expectTypeOf(doubled).toEqualTypeOf<NonEmptyReadonlySet<number>>();
|
|
177
|
+
* expect(doubled).toEqual(new Set([2, 4, 6]));
|
|
178
|
+
* expect(parity).toEqual(new Set([1, 0]));
|
|
144
179
|
* ```
|
|
145
180
|
*
|
|
146
181
|
* @group Transformations
|
|
@@ -155,10 +190,21 @@ export declare function mapSet<T, U>(set: ReadonlySet<T>, mapper: (item: T) => U
|
|
|
155
190
|
* When used with a refinement function (with `value is Type` syntax),
|
|
156
191
|
* TypeScript will narrow the result type.
|
|
157
192
|
*
|
|
158
|
-
* ###
|
|
193
|
+
* ### Filtering and refining
|
|
159
194
|
*
|
|
160
195
|
* ```ts
|
|
161
|
-
*
|
|
196
|
+
* import { filterSet } from "@evolu/common";
|
|
197
|
+
*
|
|
198
|
+
* const evens = filterSet(new Set([1, 2, 3, 4, 5]), (x) => x % 2 === 0);
|
|
199
|
+
* expect(evens).toEqual(new Set([2, 4]));
|
|
200
|
+
*
|
|
201
|
+
* const mixed: ReadonlySet<string | number> = new Set([1, "a", 2, "b"]);
|
|
202
|
+
* const strings = filterSet(
|
|
203
|
+
* mixed,
|
|
204
|
+
* (value): value is string => typeof value === "string",
|
|
205
|
+
* );
|
|
206
|
+
* expectTypeOf(strings).toEqualTypeOf<ReadonlySet<string>>();
|
|
207
|
+
* expect(strings).toEqual(new Set(["a", "b"]));
|
|
162
208
|
* ```
|
|
163
209
|
*
|
|
164
210
|
* @group Transformations
|
|
@@ -169,10 +215,13 @@ export declare function filterSet<T>(set: ReadonlySet<T>, predicate: PredicateWi
|
|
|
169
215
|
/**
|
|
170
216
|
* Returns the first element of a non-empty set (by insertion order).
|
|
171
217
|
*
|
|
172
|
-
* ###
|
|
218
|
+
* ### Reading the first value
|
|
173
219
|
*
|
|
174
220
|
* ```ts
|
|
175
|
-
*
|
|
221
|
+
* import { createSet, firstInSet } from "@evolu/common";
|
|
222
|
+
*
|
|
223
|
+
* const set = createSet(["a", "b", "c"]);
|
|
224
|
+
* expect(firstInSet(set)).toBe("a");
|
|
176
225
|
* ```
|
|
177
226
|
*
|
|
178
227
|
* @group Accessors
|
package/dist/src/Set.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Set.d.ts","sourceRoot":"","sources":["../../src/Set.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"Set.d.ts","sourceRoot":"","sources":["../../src/Set.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,YAAY,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CAAC,EACzB,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC,EACnB,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GACrB,WAAW,CAAC,CAAC,CAAC,CAAC;AAYlB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EACtC,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC,EACnB,UAAU,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC,WAAW,CAAC,CAAC,CAAC,CAAC;AAClB,sBAAsB;AACtB,wBAAgB,SAAS,CAAC,CAAC,EACzB,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC,EACnB,SAAS,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAC/B,WAAW,CAAC,CAAC,CAAC,CAAC;AAelB;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,UAAU,GAAI,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,KAAG,CAC5B,CAAC"}
|
package/dist/src/Set.js
CHANGED
|
@@ -8,25 +8,30 @@
|
|
|
8
8
|
* Use {@link isNonEmptySet} to narrow to {@link NonEmptyReadonlySet} before
|
|
9
9
|
* calling functions like {@link firstInSet} that require a non-empty set.
|
|
10
10
|
*
|
|
11
|
-
* ###
|
|
11
|
+
* ### Composing immutable and native operations
|
|
12
12
|
*
|
|
13
13
|
* ```ts
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* const
|
|
24
|
-
* const
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* const
|
|
14
|
+
* import {
|
|
15
|
+
* addToSet,
|
|
16
|
+
* deleteFromSet,
|
|
17
|
+
* filterSet,
|
|
18
|
+
* firstInSet,
|
|
19
|
+
* isNonEmptySet,
|
|
20
|
+
* mapSet,
|
|
21
|
+
* } from "@evolu/common";
|
|
22
|
+
*
|
|
23
|
+
* const values = addToSet(new Set([1, 2]), 3);
|
|
24
|
+
* const withoutOne = deleteFromSet(values, 1);
|
|
25
|
+
* const doubled = mapSet(withoutOne, (x) => x * 2);
|
|
26
|
+
* const atLeastFour = filterSet(doubled, (x) => x >= 4);
|
|
27
|
+
*
|
|
28
|
+
* // Evolu's readonly results compose with native Set operations.
|
|
29
|
+
* const union = atLeastFour.union(new Set([6, 8]));
|
|
30
|
+
* const intersection = union.intersection(new Set([4, 6, 8, 10]));
|
|
31
|
+
* const difference = intersection.difference(new Set([4]));
|
|
32
|
+
*
|
|
33
|
+
* if (!isNonEmptySet(difference)) throw new Error("Expected values");
|
|
34
|
+
* expect(firstInSet(difference)).toBe(6);
|
|
30
35
|
* ```
|
|
31
36
|
*
|
|
32
37
|
* @module
|
|
@@ -54,13 +59,16 @@ export function createSet(items) {
|
|
|
54
59
|
* negated guard is better than `.size === 0` for early returns because
|
|
55
60
|
* TypeScript narrows the type after the check.
|
|
56
61
|
*
|
|
57
|
-
* ###
|
|
62
|
+
* ### Narrowing before access
|
|
58
63
|
*
|
|
59
64
|
* ```ts
|
|
65
|
+
* import { isNonEmptySet, type NonEmptyReadonlySet } from "@evolu/common";
|
|
66
|
+
*
|
|
60
67
|
* const set: ReadonlySet<number> = new Set([1, 2, 3]);
|
|
61
|
-
* if (isNonEmptySet(set))
|
|
62
|
-
*
|
|
63
|
-
*
|
|
68
|
+
* if (!isNonEmptySet(set)) throw new Error("Expected a non-empty set");
|
|
69
|
+
*
|
|
70
|
+
* expectTypeOf(set).toEqualTypeOf<NonEmptyReadonlySet<number>>();
|
|
71
|
+
* expect(set.size).toBe(3);
|
|
64
72
|
* ```
|
|
65
73
|
*
|
|
66
74
|
* @group Type guards
|
|
@@ -72,11 +80,18 @@ export const isNonEmptySet = (set) => set.size > 0;
|
|
|
72
80
|
* If the item already exists, returns a new set with the same elements (still a
|
|
73
81
|
* new reference for change detection).
|
|
74
82
|
*
|
|
75
|
-
* ###
|
|
83
|
+
* ### Adding without mutation
|
|
76
84
|
*
|
|
77
85
|
* ```ts
|
|
78
|
-
*
|
|
79
|
-
*
|
|
86
|
+
* import { addToSet, type NonEmptyReadonlySet } from "@evolu/common";
|
|
87
|
+
*
|
|
88
|
+
* const original: ReadonlySet<number> = new Set([1, 2]);
|
|
89
|
+
* const added = addToSet(original, 3);
|
|
90
|
+
* const unchanged = addToSet(original, 2);
|
|
91
|
+
*
|
|
92
|
+
* expectTypeOf(added).toEqualTypeOf<NonEmptyReadonlySet<number>>();
|
|
93
|
+
* expect(added).toEqual(new Set([1, 2, 3]));
|
|
94
|
+
* expect(unchanged).not.toBe(original);
|
|
80
95
|
* ```
|
|
81
96
|
*
|
|
82
97
|
* @group Transformations
|
|
@@ -92,11 +107,14 @@ export const addToSet = (set, item) => {
|
|
|
92
107
|
* If the item doesn't exist, returns a new set with the same elements (still a
|
|
93
108
|
* new reference for change detection).
|
|
94
109
|
*
|
|
95
|
-
* ###
|
|
110
|
+
* ### Deleting without mutation
|
|
96
111
|
*
|
|
97
112
|
* ```ts
|
|
98
|
-
* deleteFromSet
|
|
99
|
-
*
|
|
113
|
+
* import { deleteFromSet } from "@evolu/common";
|
|
114
|
+
*
|
|
115
|
+
* const original = new Set([1, 2, 3]);
|
|
116
|
+
* expect(deleteFromSet(original, 2)).toEqual(new Set([1, 3]));
|
|
117
|
+
* expect(deleteFromSet(original, 5)).not.toBe(original);
|
|
100
118
|
* ```
|
|
101
119
|
*
|
|
102
120
|
* @group Transformations
|
|
@@ -126,10 +144,13 @@ export function filterSet(set, predicate) {
|
|
|
126
144
|
/**
|
|
127
145
|
* Returns the first element of a non-empty set (by insertion order).
|
|
128
146
|
*
|
|
129
|
-
* ###
|
|
147
|
+
* ### Reading the first value
|
|
130
148
|
*
|
|
131
149
|
* ```ts
|
|
132
|
-
*
|
|
150
|
+
* import { createSet, firstInSet } from "@evolu/common";
|
|
151
|
+
*
|
|
152
|
+
* const set = createSet(["a", "b", "c"]);
|
|
153
|
+
* expect(firstInSet(set)).toBe("a");
|
|
133
154
|
* ```
|
|
134
155
|
*
|
|
135
156
|
* @group Accessors
|
package/dist/src/Sqlite.d.ts
CHANGED
|
@@ -3,13 +3,12 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
|
-
import type { Brand } from "./Brand.
|
|
7
|
-
import type { EncryptionKey } from "./Crypto.
|
|
8
|
-
import type { Eq } from "./Eq.
|
|
9
|
-
import type { Result } from "./Result.
|
|
10
|
-
import
|
|
11
|
-
import { type
|
|
12
|
-
import type { InferType, Name, Typed } from "./Type.js";
|
|
6
|
+
import type { Brand } from "./Brand.ts";
|
|
7
|
+
import type { EncryptionKey } from "./Crypto.ts";
|
|
8
|
+
import type { Eq } from "./Eq.ts";
|
|
9
|
+
import type { Result } from "./Result.ts";
|
|
10
|
+
import { type Task, type TestRunDep } from "./Task.ts";
|
|
11
|
+
import { type ArrayType, type InferType, type Name, type ObjectType, type RecordType, type SetType, String, type Typed } from "./Type.ts";
|
|
13
12
|
/**
|
|
14
13
|
* Platform-agnostic SQLite wrapping a {@link SqliteDriver}.
|
|
15
14
|
*
|
|
@@ -61,8 +60,8 @@ export type SafeSql = string & Brand<"SafeSql">;
|
|
|
61
60
|
* Note that Evolu can't support Int64 because expo-sqlite (and some others) do
|
|
62
61
|
* not support it.
|
|
63
62
|
*/
|
|
64
|
-
export declare const SqliteValue: import("./Type.
|
|
65
|
-
export type SqliteValue = typeof SqliteValue.
|
|
63
|
+
export declare const SqliteValue: import("./Type.ts").UnionType<readonly [import("./Type.ts").LiteralType<null>, import("./Type.ts").Type<"String", string, string, import("./Type.ts").TypeOfError<"String">, null, import("./Type.ts").TypeOfError<"String">, never, string, true>, import("./Type.ts").Type<"Number", number, number, import("./Type.ts").TypeOfError<"Number">, null, import("./Type.ts").TypeOfError<"Number">, never, number, true>, import("./Type.ts").Type<"Uint8Array", Uint8Array<ArrayBufferLike>, Uint8Array<ArrayBufferLike>, import("./Type.ts").ObjectTagError<"Uint8Array">, null, import("./Type.ts").ObjectTagError<"Uint8Array">, never, Uint8Array<ArrayBufferLike>, true>]>;
|
|
64
|
+
export type SqliteValue = typeof SqliteValue.Output;
|
|
66
65
|
/** Equality comparison for {@link SqliteValue}. */
|
|
67
66
|
export declare const eqSqliteValue: Eq<SqliteValue>;
|
|
68
67
|
/** Options for configuring {@link SqliteQuery} execution behavior. */
|
|
@@ -145,10 +144,7 @@ export type SqliteDriverOptions = {
|
|
|
145
144
|
*/
|
|
146
145
|
export declare const createSqlite: (name: Name, options?: SqliteDriverOptions) => Task<Sqlite, never, CreateSqliteDriverDep>;
|
|
147
146
|
/** Creates a test setup with a in-memory {@link Sqlite}. */
|
|
148
|
-
export declare const testSetupSqlite: (deps: CreateSqliteDriverDep) => Promise<AsyncDisposable & SqliteDep &
|
|
149
|
-
readonly run: Run<TestDeps & CreateSqliteDriverDep & SqliteDep>;
|
|
150
|
-
readonly sqlite: Sqlite;
|
|
151
|
-
}>;
|
|
147
|
+
export declare const testSetupSqlite: (deps: CreateSqliteDriverDep) => Promise<AsyncDisposable & SqliteDep & TestRunDep<CreateSqliteDriverDep & SqliteDep>>;
|
|
152
148
|
/**
|
|
153
149
|
* Cache for compiled prepared statements.
|
|
154
150
|
*
|
|
@@ -177,54 +173,16 @@ export interface RawSql extends Typed<"RawSql"> {
|
|
|
177
173
|
}
|
|
178
174
|
/** A parameter accepted by the {@link sql} tagged template. */
|
|
179
175
|
export type SqlTemplateParam = SqliteValue | SqlIdentifier | RawSql;
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
* ### Example
|
|
187
|
-
*
|
|
188
|
-
* ```ts
|
|
189
|
-
* const id = 42;
|
|
190
|
-
* const name = "Alice";
|
|
191
|
-
*
|
|
192
|
-
* const result = sqlite.exec(sql`
|
|
193
|
-
* select *
|
|
194
|
-
* from users
|
|
195
|
-
* where id = ${id} and name = ${name};
|
|
196
|
-
* `);
|
|
197
|
-
*
|
|
198
|
-
* // For identifiers
|
|
199
|
-
* const tableName = "users";
|
|
200
|
-
* sqlite.exec(sql`
|
|
201
|
-
* create table ${sql.identifier(tableName)} (
|
|
202
|
-
* "id" text primary key,
|
|
203
|
-
* "name" text not null
|
|
204
|
-
* );
|
|
205
|
-
* `);
|
|
206
|
-
*
|
|
207
|
-
* // For raw SQL (use with caution)
|
|
208
|
-
* const orderBy = "created_at desc";
|
|
209
|
-
* sqlite.exec(sql`select * from users order by ${sql.raw(orderBy)};`);
|
|
210
|
-
* ```
|
|
211
|
-
*
|
|
212
|
-
* ## TIP
|
|
213
|
-
*
|
|
214
|
-
* Use `prettier-plugin-sql-cst` for SQL formatting. Like Prettier for
|
|
215
|
-
* JavaScript, this plugin formats SQL expressions differently depending on
|
|
216
|
-
* their length.
|
|
217
|
-
*/
|
|
218
|
-
export declare const sql: {
|
|
219
|
-
(strings: TemplateStringsArray, ...parameters: Array<SqlTemplateParam>): SqliteQuery;
|
|
220
|
-
identifier(identifier: string): SqlIdentifier;
|
|
221
|
-
raw(raw: string): RawSql;
|
|
222
|
-
prepared(strings: TemplateStringsArray, ...parameters: Array<SqlTemplateParam>): SqliteQuery;
|
|
223
|
-
};
|
|
176
|
+
export declare function sql(strings: TemplateStringsArray, ...parameters: Array<SqlTemplateParam>): SqliteQuery;
|
|
177
|
+
export declare namespace sql {
|
|
178
|
+
var identifier: (identifier: string) => SqlIdentifier;
|
|
179
|
+
var raw: (raw: string) => RawSql;
|
|
180
|
+
var prepared: (strings: TemplateStringsArray, ...parameters: Array<SqlTemplateParam>) => SqliteQuery;
|
|
181
|
+
}
|
|
224
182
|
/** Index metadata stored in `sqlite_master` for a {@link Sqlite} database. */
|
|
225
|
-
export declare const SqliteIndex:
|
|
226
|
-
name:
|
|
227
|
-
sql:
|
|
183
|
+
export declare const SqliteIndex: ObjectType<{
|
|
184
|
+
readonly name: typeof String;
|
|
185
|
+
readonly sql: typeof String;
|
|
228
186
|
}>;
|
|
229
187
|
export interface SqliteIndex extends InferType<typeof SqliteIndex> {
|
|
230
188
|
}
|
|
@@ -235,12 +193,9 @@ export declare const eqSqliteIndex: Eq<SqliteIndex>;
|
|
|
235
193
|
*
|
|
236
194
|
* Includes table-column mappings and user-visible indexes.
|
|
237
195
|
*/
|
|
238
|
-
export declare const SqliteSchema:
|
|
239
|
-
tables:
|
|
240
|
-
indexes:
|
|
241
|
-
name: import("./Type.js").Type<"String", string, string, import("./Type.js").StringError, string, import("./Type.js").StringError>;
|
|
242
|
-
sql: import("./Type.js").Type<"String", string, string, import("./Type.js").StringError, string, import("./Type.js").StringError>;
|
|
243
|
-
}>>;
|
|
196
|
+
export declare const SqliteSchema: ObjectType<{
|
|
197
|
+
readonly tables: RecordType<typeof String, SetType<typeof String>>;
|
|
198
|
+
readonly indexes: ArrayType<typeof SqliteIndex>;
|
|
244
199
|
}>;
|
|
245
200
|
export interface SqliteSchema extends InferType<typeof SqliteSchema> {
|
|
246
201
|
}
|
|
@@ -283,8 +238,8 @@ export declare const getSqliteSnapshot: (deps: SqliteDep) => SqliteSnapshot;
|
|
|
283
238
|
* - Use {@link booleanToSqliteBoolean} and {@link sqliteBooleanToBoolean} for
|
|
284
239
|
* converting between JavaScript booleans and SQLite boolean values.
|
|
285
240
|
*/
|
|
286
|
-
export declare const SqliteBoolean: import("./Type.
|
|
287
|
-
export type SqliteBoolean = typeof SqliteBoolean.
|
|
241
|
+
export declare const SqliteBoolean: import("./Type.ts").UnionType<readonly [import("./Type.ts").LiteralType<0>, import("./Type.ts").LiteralType<1>]>;
|
|
242
|
+
export type SqliteBoolean = typeof SqliteBoolean.Output;
|
|
288
243
|
/**
|
|
289
244
|
* Represents the {@link SqliteBoolean} value for `true`.
|
|
290
245
|
*
|
|
@@ -303,8 +258,9 @@ export declare const sqliteFalse = 0;
|
|
|
303
258
|
* ### Example
|
|
304
259
|
*
|
|
305
260
|
* ```ts
|
|
306
|
-
*
|
|
307
|
-
*
|
|
261
|
+
* import { booleanToSqliteBoolean } from "@evolu/common";
|
|
262
|
+
*
|
|
263
|
+
* expect(booleanToSqliteBoolean(true)).toBe(1);
|
|
308
264
|
* ```
|
|
309
265
|
*/
|
|
310
266
|
export declare const booleanToSqliteBoolean: (value: boolean) => SqliteBoolean;
|
|
@@ -314,8 +270,9 @@ export declare const booleanToSqliteBoolean: (value: boolean) => SqliteBoolean;
|
|
|
314
270
|
* ### Example
|
|
315
271
|
*
|
|
316
272
|
* ```ts
|
|
317
|
-
*
|
|
318
|
-
*
|
|
273
|
+
* import { sqliteBooleanToBoolean } from "@evolu/common";
|
|
274
|
+
*
|
|
275
|
+
* expect(sqliteBooleanToBoolean(1)).toBe(true);
|
|
319
276
|
* ```
|
|
320
277
|
*/
|
|
321
278
|
export declare const sqliteBooleanToBoolean: (value: SqliteBoolean) => boolean;
|
package/dist/src/Sqlite.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sqlite.d.ts","sourceRoot":"","sources":["../../src/Sqlite.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"Sqlite.d.ts","sourceRoot":"","sources":["../../src/Sqlite.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAIlC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAiB,KAAK,IAAI,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AACtE,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,IAAI,EAIT,KAAK,U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