@livestore/livestore 0.2.0 → 0.3.0-dev.11
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/.tsbuildinfo +1 -1
- package/dist/SqliteDbWrapper.d.ts +54 -0
- package/dist/SqliteDbWrapper.d.ts.map +1 -0
- package/dist/SqliteDbWrapper.js +212 -0
- package/dist/SqliteDbWrapper.js.map +1 -0
- package/dist/SynchronousDatabaseWrapper.d.ts +20 -6
- package/dist/SynchronousDatabaseWrapper.d.ts.map +1 -1
- package/dist/SynchronousDatabaseWrapper.js +38 -6
- package/dist/SynchronousDatabaseWrapper.js.map +1 -1
- package/dist/__tests__/fixture.d.ts +252 -0
- package/dist/__tests__/fixture.d.ts.map +1 -0
- package/dist/__tests__/fixture.js +18 -0
- package/dist/__tests__/fixture.js.map +1 -0
- package/dist/effect/LiveStore.d.ts +16 -12
- package/dist/effect/LiveStore.d.ts.map +1 -1
- package/dist/effect/LiveStore.js +14 -14
- package/dist/effect/LiveStore.js.map +1 -1
- package/dist/index.d.ts +6 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/live-queries/base-class.d.ts +64 -21
- package/dist/live-queries/base-class.d.ts.map +1 -1
- package/dist/live-queries/base-class.js +56 -13
- package/dist/live-queries/base-class.js.map +1 -1
- package/dist/live-queries/computed.d.ts +7 -7
- package/dist/live-queries/computed.d.ts.map +1 -1
- package/dist/live-queries/computed.js +35 -11
- package/dist/live-queries/computed.js.map +1 -1
- package/dist/live-queries/{sql.d.ts → db-query.d.ts} +19 -14
- package/dist/live-queries/db-query.d.ts.map +1 -0
- package/dist/live-queries/db-query.js +244 -0
- package/dist/live-queries/db-query.js.map +1 -0
- package/dist/live-queries/db-query.test.d.ts +2 -0
- package/dist/live-queries/db-query.test.d.ts.map +1 -0
- package/dist/live-queries/db-query.test.js +123 -0
- package/dist/live-queries/db-query.test.js.map +1 -0
- package/dist/live-queries/db.d.ts +12 -15
- package/dist/live-queries/db.d.ts.map +1 -1
- package/dist/live-queries/db.js +72 -48
- package/dist/live-queries/db.js.map +1 -1
- package/dist/live-queries/db.test.js +18 -15
- package/dist/live-queries/db.test.js.map +1 -1
- package/dist/live-queries/graphql.d.ts +8 -8
- package/dist/live-queries/graphql.d.ts.map +1 -1
- package/dist/live-queries/graphql.js +35 -9
- package/dist/live-queries/graphql.js.map +1 -1
- package/dist/live-queries/make-ref.d.ts +20 -0
- package/dist/live-queries/make-ref.d.ts.map +1 -0
- package/dist/live-queries/make-ref.js +33 -0
- package/dist/live-queries/make-ref.js.map +1 -0
- package/dist/reactive.d.ts +15 -13
- package/dist/reactive.d.ts.map +1 -1
- package/dist/reactive.js +15 -9
- package/dist/reactive.js.map +1 -1
- package/dist/row-query-utils.d.ts +4 -4
- package/dist/row-query-utils.d.ts.map +1 -1
- package/dist/row-query-utils.js +14 -10
- package/dist/row-query-utils.js.map +1 -1
- package/dist/store/create-store.d.ts +13 -12
- package/dist/store/create-store.d.ts.map +1 -1
- package/dist/store/create-store.js +27 -33
- package/dist/store/create-store.js.map +1 -1
- package/dist/store/devtools.d.ts +3 -3
- package/dist/store/devtools.d.ts.map +1 -1
- package/dist/store/devtools.js +56 -34
- package/dist/store/devtools.js.map +1 -1
- package/dist/store/store-types.d.ts +18 -18
- package/dist/store/store-types.d.ts.map +1 -1
- package/dist/store/store-types.js.map +1 -1
- package/dist/store/store.d.ts +57 -38
- package/dist/store/store.d.ts.map +1 -1
- package/dist/store/store.js +225 -188
- package/dist/store/store.js.map +1 -1
- package/dist/store/store.test.d.ts +2 -0
- package/dist/store/store.test.d.ts.map +1 -0
- package/dist/store/store.test.js +27 -0
- package/dist/store/store.test.js.map +1 -0
- package/dist/utils/dev.d.ts.map +1 -1
- package/dist/utils/dev.js +3 -2
- package/dist/utils/dev.js.map +1 -1
- package/dist/utils/expo.d.ts +2 -0
- package/dist/utils/expo.d.ts.map +1 -0
- package/dist/utils/expo.js +8 -0
- package/dist/utils/expo.js.map +1 -0
- package/dist/utils/function-string.d.ts +7 -0
- package/dist/utils/function-string.d.ts.map +1 -0
- package/dist/utils/function-string.js +9 -0
- package/dist/utils/function-string.js.map +1 -0
- package/dist/utils/stack-info.d.ts.map +1 -1
- package/dist/utils/stack-info.js +6 -1
- package/dist/utils/stack-info.js.map +1 -1
- package/dist/utils/stack-info.test.js +54 -1
- package/dist/utils/stack-info.test.js.map +1 -1
- package/dist/utils/tests/fixture.d.ts +2 -6
- package/dist/utils/tests/fixture.d.ts.map +1 -1
- package/dist/utils/tests/fixture.js +7 -13
- package/dist/utils/tests/fixture.js.map +1 -1
- package/dist/utils/tests/mod.d.ts +1 -0
- package/dist/utils/tests/mod.d.ts.map +1 -1
- package/dist/utils/tests/mod.js +1 -0
- package/dist/utils/tests/mod.js.map +1 -1
- package/dist/utils/tests/otel.d.ts +60 -1
- package/dist/utils/tests/otel.d.ts.map +1 -1
- package/dist/utils/tests/otel.js +65 -4
- package/dist/utils/tests/otel.js.map +1 -1
- package/package.json +12 -12
- package/src/{SynchronousDatabaseWrapper.ts → SqliteDbWrapper.ts} +59 -13
- package/src/ambient.d.ts +1 -1
- package/src/effect/LiveStore.ts +32 -33
- package/src/index.ts +14 -7
- package/src/live-queries/__snapshots__/{db.test.ts.snap → db-query.test.ts.snap} +220 -69
- package/src/live-queries/base-class.ts +160 -40
- package/src/live-queries/computed.ts +45 -19
- package/src/live-queries/{db.test.ts → db-query.test.ts} +23 -12
- package/src/live-queries/{db.ts → db-query.ts} +124 -61
- package/src/live-queries/graphql.ts +47 -21
- package/src/live-queries/make-ref.ts +47 -0
- package/src/reactive.ts +52 -27
- package/src/row-query-utils.ts +29 -18
- package/src/store/create-store.ts +106 -113
- package/src/store/devtools.ts +65 -39
- package/src/store/store-types.ts +20 -18
- package/src/store/store.ts +361 -290
- package/src/utils/dev.ts +4 -2
- package/src/utils/function-string.ts +12 -0
- package/src/utils/stack-info.test.ts +58 -1
- package/src/utils/stack-info.ts +6 -1
- package/src/utils/tests/fixture.ts +6 -16
- package/src/utils/tests/mod.ts +1 -0
- package/src/utils/tests/otel.ts +71 -5
- package/dist/live-queries/sql.d.ts.map +0 -1
- package/dist/live-queries/sql.js +0 -175
- package/dist/live-queries/sql.js.map +0 -1
- package/dist/live-queries/sql.test.d.ts +0 -2
- package/dist/live-queries/sql.test.d.ts.map +0 -1
- package/dist/live-queries/sql.test.js +0 -285
- package/dist/live-queries/sql.test.js.map +0 -1
- package/dist/reactiveQueries/base-class.d.ts +0 -64
- package/dist/reactiveQueries/base-class.d.ts.map +0 -1
- package/dist/reactiveQueries/base-class.js +0 -31
- package/dist/reactiveQueries/base-class.js.map +0 -1
- package/dist/reactiveQueries/computed.d.ts +0 -26
- package/dist/reactiveQueries/computed.d.ts.map +0 -1
- package/dist/reactiveQueries/computed.js +0 -38
- package/dist/reactiveQueries/computed.js.map +0 -1
- package/dist/reactiveQueries/graphql.d.ts +0 -49
- package/dist/reactiveQueries/graphql.d.ts.map +0 -1
- package/dist/reactiveQueries/graphql.js +0 -122
- package/dist/reactiveQueries/graphql.js.map +0 -1
- package/dist/reactiveQueries/sql.d.ts +0 -62
- package/dist/reactiveQueries/sql.d.ts.map +0 -1
- package/dist/reactiveQueries/sql.js +0 -175
- package/dist/reactiveQueries/sql.js.map +0 -1
- package/dist/reactiveQueries/sql.test.d.ts +0 -2
- package/dist/reactiveQueries/sql.test.d.ts.map +0 -1
- package/dist/reactiveQueries/sql.test.js +0 -285
- package/dist/reactiveQueries/sql.test.js.map +0 -1
- package/dist/row-query.d.ts +0 -16
- package/dist/row-query.d.ts.map +0 -1
- package/dist/row-query.js +0 -30
- package/dist/row-query.js.map +0 -1
- package/src/global-state.ts +0 -20
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { DbSchema } from '@livestore/common/schema';
|
|
2
|
+
import { Schema } from '@livestore/utils/effect';
|
|
3
|
+
export declare const todos: DbSchema.TableDef<{
|
|
4
|
+
name: "todos";
|
|
5
|
+
columns: {
|
|
6
|
+
id: {
|
|
7
|
+
columnType: "text";
|
|
8
|
+
schema: Schema.Schema<string, string, never>;
|
|
9
|
+
default: import("effect/Option").None<never>;
|
|
10
|
+
nullable: false;
|
|
11
|
+
primaryKey: true;
|
|
12
|
+
};
|
|
13
|
+
text: {
|
|
14
|
+
columnType: "text";
|
|
15
|
+
schema: Schema.Schema<string, string, never>;
|
|
16
|
+
default: import("effect/Option").Some<"">;
|
|
17
|
+
nullable: false;
|
|
18
|
+
primaryKey: false;
|
|
19
|
+
};
|
|
20
|
+
completed: {
|
|
21
|
+
columnType: "integer";
|
|
22
|
+
schema: Schema.Schema<boolean, number, never>;
|
|
23
|
+
default: import("effect/Option").Some<false>;
|
|
24
|
+
nullable: false;
|
|
25
|
+
primaryKey: false;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
indexes?: ReadonlyArray<DbSchema.SqliteDsl.Index>;
|
|
29
|
+
ast: import("@livestore/db-schema/dist/ast/sqlite.js").Table;
|
|
30
|
+
}, {
|
|
31
|
+
isSingleton: false;
|
|
32
|
+
disableAutomaticIdColumn: false;
|
|
33
|
+
deriveMutations: {
|
|
34
|
+
enabled: true;
|
|
35
|
+
localOnly: boolean;
|
|
36
|
+
};
|
|
37
|
+
isSingleColumn: false;
|
|
38
|
+
requiredInsertColumnNames: "id";
|
|
39
|
+
}, Schema.Schema<{
|
|
40
|
+
readonly id: string;
|
|
41
|
+
readonly text: string;
|
|
42
|
+
readonly completed: boolean;
|
|
43
|
+
}, {
|
|
44
|
+
readonly id: string;
|
|
45
|
+
readonly text: string;
|
|
46
|
+
readonly completed: number;
|
|
47
|
+
}, never>>;
|
|
48
|
+
export declare const appConfig: DbSchema.TableDef<{
|
|
49
|
+
name: "app_config";
|
|
50
|
+
columns: {
|
|
51
|
+
value: {
|
|
52
|
+
columnType: "text";
|
|
53
|
+
schema: Schema.Schema<{
|
|
54
|
+
readonly fontSize: number;
|
|
55
|
+
readonly theme: "light" | "dark";
|
|
56
|
+
} | null, string | null, never>;
|
|
57
|
+
default: import("effect/Option").None<never>;
|
|
58
|
+
nullable: true;
|
|
59
|
+
primaryKey: false;
|
|
60
|
+
};
|
|
61
|
+
id: DbSchema.SqliteDsl.ColumnDefinition<"singleton", "singleton">;
|
|
62
|
+
};
|
|
63
|
+
indexes?: ReadonlyArray<DbSchema.SqliteDsl.Index>;
|
|
64
|
+
ast: import("@livestore/db-schema/dist/ast/sqlite.js").Table;
|
|
65
|
+
}, {
|
|
66
|
+
isSingleton: true;
|
|
67
|
+
disableAutomaticIdColumn: false;
|
|
68
|
+
deriveMutations: {
|
|
69
|
+
enabled: true;
|
|
70
|
+
localOnly: boolean;
|
|
71
|
+
};
|
|
72
|
+
isSingleColumn: true;
|
|
73
|
+
requiredInsertColumnNames: never;
|
|
74
|
+
}, Schema.Schema<{
|
|
75
|
+
readonly value: {
|
|
76
|
+
readonly fontSize: number;
|
|
77
|
+
readonly theme: "light" | "dark";
|
|
78
|
+
} | null;
|
|
79
|
+
readonly id: "singleton";
|
|
80
|
+
}, {
|
|
81
|
+
readonly value: string | null;
|
|
82
|
+
readonly id: "singleton";
|
|
83
|
+
}, never>>;
|
|
84
|
+
export declare const tables: {
|
|
85
|
+
todos: DbSchema.TableDef<{
|
|
86
|
+
name: "todos";
|
|
87
|
+
columns: {
|
|
88
|
+
id: {
|
|
89
|
+
columnType: "text";
|
|
90
|
+
schema: Schema.Schema<string, string, never>;
|
|
91
|
+
default: import("effect/Option").None<never>;
|
|
92
|
+
nullable: false;
|
|
93
|
+
primaryKey: true;
|
|
94
|
+
};
|
|
95
|
+
text: {
|
|
96
|
+
columnType: "text";
|
|
97
|
+
schema: Schema.Schema<string, string, never>;
|
|
98
|
+
default: import("effect/Option").Some<"">;
|
|
99
|
+
nullable: false;
|
|
100
|
+
primaryKey: false;
|
|
101
|
+
};
|
|
102
|
+
completed: {
|
|
103
|
+
columnType: "integer";
|
|
104
|
+
schema: Schema.Schema<boolean, number, never>;
|
|
105
|
+
default: import("effect/Option").Some<false>;
|
|
106
|
+
nullable: false;
|
|
107
|
+
primaryKey: false;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
indexes?: ReadonlyArray<DbSchema.SqliteDsl.Index>;
|
|
111
|
+
ast: import("@livestore/db-schema/dist/ast/sqlite.js").Table;
|
|
112
|
+
}, {
|
|
113
|
+
isSingleton: false;
|
|
114
|
+
disableAutomaticIdColumn: false;
|
|
115
|
+
deriveMutations: {
|
|
116
|
+
enabled: true;
|
|
117
|
+
localOnly: boolean;
|
|
118
|
+
};
|
|
119
|
+
isSingleColumn: false;
|
|
120
|
+
requiredInsertColumnNames: "id";
|
|
121
|
+
}, Schema.Schema<{
|
|
122
|
+
readonly id: string;
|
|
123
|
+
readonly text: string;
|
|
124
|
+
readonly completed: boolean;
|
|
125
|
+
}, {
|
|
126
|
+
readonly id: string;
|
|
127
|
+
readonly text: string;
|
|
128
|
+
readonly completed: number;
|
|
129
|
+
}, never>>;
|
|
130
|
+
appConfig: DbSchema.TableDef<{
|
|
131
|
+
name: "app_config";
|
|
132
|
+
columns: {
|
|
133
|
+
value: {
|
|
134
|
+
columnType: "text";
|
|
135
|
+
schema: Schema.Schema<{
|
|
136
|
+
readonly fontSize: number;
|
|
137
|
+
readonly theme: "light" | "dark";
|
|
138
|
+
} | null, string | null, never>;
|
|
139
|
+
default: import("effect/Option").None<never>;
|
|
140
|
+
nullable: true;
|
|
141
|
+
primaryKey: false;
|
|
142
|
+
};
|
|
143
|
+
id: DbSchema.SqliteDsl.ColumnDefinition<"singleton", "singleton">;
|
|
144
|
+
};
|
|
145
|
+
indexes?: ReadonlyArray<DbSchema.SqliteDsl.Index>;
|
|
146
|
+
ast: import("@livestore/db-schema/dist/ast/sqlite.js").Table;
|
|
147
|
+
}, {
|
|
148
|
+
isSingleton: true;
|
|
149
|
+
disableAutomaticIdColumn: false;
|
|
150
|
+
deriveMutations: {
|
|
151
|
+
enabled: true;
|
|
152
|
+
localOnly: boolean;
|
|
153
|
+
};
|
|
154
|
+
isSingleColumn: true;
|
|
155
|
+
requiredInsertColumnNames: never;
|
|
156
|
+
}, Schema.Schema<{
|
|
157
|
+
readonly value: {
|
|
158
|
+
readonly fontSize: number;
|
|
159
|
+
readonly theme: "light" | "dark";
|
|
160
|
+
} | null;
|
|
161
|
+
readonly id: "singleton";
|
|
162
|
+
}, {
|
|
163
|
+
readonly value: string | null;
|
|
164
|
+
readonly id: "singleton";
|
|
165
|
+
}, never>>;
|
|
166
|
+
};
|
|
167
|
+
export declare const schema: import("@livestore/common/schema").FromInputSchema.DeriveSchema<{
|
|
168
|
+
tables: {
|
|
169
|
+
todos: DbSchema.TableDef<{
|
|
170
|
+
name: "todos";
|
|
171
|
+
columns: {
|
|
172
|
+
id: {
|
|
173
|
+
columnType: "text";
|
|
174
|
+
schema: Schema.Schema<string, string, never>;
|
|
175
|
+
default: import("effect/Option").None<never>;
|
|
176
|
+
nullable: false;
|
|
177
|
+
primaryKey: true;
|
|
178
|
+
};
|
|
179
|
+
text: {
|
|
180
|
+
columnType: "text";
|
|
181
|
+
schema: Schema.Schema<string, string, never>;
|
|
182
|
+
default: import("effect/Option").Some<"">;
|
|
183
|
+
nullable: false;
|
|
184
|
+
primaryKey: false;
|
|
185
|
+
};
|
|
186
|
+
completed: {
|
|
187
|
+
columnType: "integer";
|
|
188
|
+
schema: Schema.Schema<boolean, number, never>;
|
|
189
|
+
default: import("effect/Option").Some<false>;
|
|
190
|
+
nullable: false;
|
|
191
|
+
primaryKey: false;
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
indexes?: ReadonlyArray<DbSchema.SqliteDsl.Index>;
|
|
195
|
+
ast: import("@livestore/db-schema/dist/ast/sqlite.js").Table;
|
|
196
|
+
}, {
|
|
197
|
+
isSingleton: false;
|
|
198
|
+
disableAutomaticIdColumn: false;
|
|
199
|
+
deriveMutations: {
|
|
200
|
+
enabled: true;
|
|
201
|
+
localOnly: boolean;
|
|
202
|
+
};
|
|
203
|
+
isSingleColumn: false;
|
|
204
|
+
requiredInsertColumnNames: "id";
|
|
205
|
+
}, Schema.Schema<{
|
|
206
|
+
readonly id: string;
|
|
207
|
+
readonly text: string;
|
|
208
|
+
readonly completed: boolean;
|
|
209
|
+
}, {
|
|
210
|
+
readonly id: string;
|
|
211
|
+
readonly text: string;
|
|
212
|
+
readonly completed: number;
|
|
213
|
+
}, never>>;
|
|
214
|
+
appConfig: DbSchema.TableDef<{
|
|
215
|
+
name: "app_config";
|
|
216
|
+
columns: {
|
|
217
|
+
value: {
|
|
218
|
+
columnType: "text";
|
|
219
|
+
schema: Schema.Schema<{
|
|
220
|
+
readonly fontSize: number;
|
|
221
|
+
readonly theme: "light" | "dark";
|
|
222
|
+
} | null, string | null, never>;
|
|
223
|
+
default: import("effect/Option").None<never>;
|
|
224
|
+
nullable: true;
|
|
225
|
+
primaryKey: false;
|
|
226
|
+
};
|
|
227
|
+
id: DbSchema.SqliteDsl.ColumnDefinition<"singleton", "singleton">;
|
|
228
|
+
};
|
|
229
|
+
indexes?: ReadonlyArray<DbSchema.SqliteDsl.Index>;
|
|
230
|
+
ast: import("@livestore/db-schema/dist/ast/sqlite.js").Table;
|
|
231
|
+
}, {
|
|
232
|
+
isSingleton: true;
|
|
233
|
+
disableAutomaticIdColumn: false;
|
|
234
|
+
deriveMutations: {
|
|
235
|
+
enabled: true;
|
|
236
|
+
localOnly: boolean;
|
|
237
|
+
};
|
|
238
|
+
isSingleColumn: true;
|
|
239
|
+
requiredInsertColumnNames: never;
|
|
240
|
+
}, Schema.Schema<{
|
|
241
|
+
readonly value: {
|
|
242
|
+
readonly fontSize: number;
|
|
243
|
+
readonly theme: "light" | "dark";
|
|
244
|
+
} | null;
|
|
245
|
+
readonly id: "singleton";
|
|
246
|
+
}, {
|
|
247
|
+
readonly value: string | null;
|
|
248
|
+
readonly id: "singleton";
|
|
249
|
+
}, never>>;
|
|
250
|
+
};
|
|
251
|
+
}>;
|
|
252
|
+
//# sourceMappingURL=fixture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixture.d.ts","sourceRoot":"","sources":["../../src/__tests__/fixture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAc,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAEhD,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAQjB,CAAA;AAOD,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAGpB,CAAA;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAuB,CAAA;AAE1C,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAyB,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DbSchema, makeSchema } from '@livestore/common/schema';
|
|
2
|
+
import { Schema } from '@livestore/utils/effect';
|
|
3
|
+
export const todos = DbSchema.table('todos', {
|
|
4
|
+
id: DbSchema.text({ primaryKey: true }),
|
|
5
|
+
text: DbSchema.text({ default: '', nullable: false }),
|
|
6
|
+
completed: DbSchema.boolean({ default: false, nullable: false }),
|
|
7
|
+
}, { deriveMutations: true });
|
|
8
|
+
const Config = Schema.Struct({
|
|
9
|
+
fontSize: Schema.Number,
|
|
10
|
+
theme: Schema.Literal('light', 'dark'),
|
|
11
|
+
});
|
|
12
|
+
export const appConfig = DbSchema.table('app_config', DbSchema.json({ schema: Config, nullable: true }), {
|
|
13
|
+
isSingleton: true,
|
|
14
|
+
deriveMutations: true,
|
|
15
|
+
});
|
|
16
|
+
export const tables = { todos, appConfig };
|
|
17
|
+
export const schema = mak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AA"}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import type { Adapter, BootStatus, UnexpectedError } from '@livestore/common';
|
|
2
2
|
import type { LiveStoreSchema } from '@livestore/common/schema';
|
|
3
|
-
import type { Cause, Scope } from '@livestore/utils/effect';
|
|
3
|
+
import type { Cause, OtelTracer, Scope } from '@livestore/utils/effect';
|
|
4
4
|
import { Context, Deferred, Effect, Layer } from '@livestore/utils/effect';
|
|
5
|
-
import * as otel from '@opentelemetry/api';
|
|
5
|
+
import type * as otel from '@opentelemetry/api';
|
|
6
6
|
import type { GraphQLSchema } from 'graphql';
|
|
7
|
+
import type { SqliteDbWrapper } from '../SqliteDbWrapper.js';
|
|
7
8
|
import type { Store } from '../store/store.js';
|
|
8
9
|
import type { BaseGraphQLContext, LiveStoreContextRunning as LiveStoreContextRunning_ } from '../store/store-types.js';
|
|
9
|
-
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
declare const LiveStoreContextRunning_base: Context.TagClass<LiveStoreContextRunning, "@livestore/livestore/effect/LiveStoreContextRunning", LiveStoreContextRunning_>;
|
|
11
|
+
export declare class LiveStoreContextRunning extends LiveStoreContextRunning_base {
|
|
12
|
+
static fromDeferred: Layer.Layer<LiveStoreContextRunning, UnexpectedError, DeferredStoreContext>;
|
|
13
|
+
}
|
|
14
|
+
declare const DeferredStoreContext_base: Context.TagClass<DeferredStoreContext, "@livestore/livestore/effect/DeferredStoreContext", Deferred.Deferred<LiveStoreContextRunning_, UnexpectedError>>;
|
|
15
|
+
export declare class DeferredStoreContext extends DeferredStoreContext_base {
|
|
16
|
+
}
|
|
14
17
|
export type LiveStoreContextProps<GraphQLContext extends BaseGraphQLContext> = {
|
|
15
18
|
schema: LiveStoreSchema;
|
|
16
19
|
/**
|
|
@@ -23,16 +26,17 @@ export type LiveStoreContextProps<GraphQLContext extends BaseGraphQLContext> = {
|
|
|
23
26
|
*/
|
|
24
27
|
storeId?: string;
|
|
25
28
|
graphQLOptions?: {
|
|
26
|
-
schema: Effect.Effect<GraphQLSchema, never,
|
|
27
|
-
makeContext: (db:
|
|
29
|
+
schema: Effect.Effect<GraphQLSchema, never, OtelTracer.OtelTracer>;
|
|
30
|
+
makeContext: (db: SqliteDbWrapper, tracer: otel.Tracer, sessionId: string) => GraphQLContext;
|
|
28
31
|
};
|
|
29
|
-
boot?: (store: Store<GraphQLContext, LiveStoreSchema>) => Effect.Effect<void, unknown,
|
|
32
|
+
boot?: (store: Store<GraphQLContext, LiveStoreSchema>) => Effect.Effect<void, unknown, OtelTracer.OtelTracer | LiveStoreContextRunning>;
|
|
30
33
|
adapter: Adapter;
|
|
31
34
|
disableDevtools?: boolean;
|
|
32
35
|
onBootStatus?: (status: BootStatus) => void;
|
|
33
36
|
batchUpdates: (run: () => void) => void;
|
|
34
37
|
};
|
|
35
|
-
export declare const LiveStoreContextLayer: <GraphQLContext extends BaseGraphQLContext>(props: LiveStoreContextProps<GraphQLContext>) => Layer.Layer<LiveStoreContextRunning, UnexpectedError | Cause.TimeoutException,
|
|
38
|
+
export declare const LiveStoreContextLayer: <GraphQLContext extends BaseGraphQLContext>(props: LiveStoreContextProps<GraphQLContext>) => Layer.Layer<LiveStoreContextRunning, UnexpectedError | Cause.TimeoutException, OtelTracer.OtelTracer>;
|
|
36
39
|
export declare const LiveStoreContextDeferred: Layer.Layer<DeferredStoreContext, never, never>;
|
|
37
|
-
export declare const makeLiveStoreContext: <GraphQLContext extends BaseGraphQLContext>({ schema, storeId, graphQLOptions: graphQLOptions_, boot, adapter, disableDevtools, onBootStatus, batchUpdates, }: LiveStoreContextProps<GraphQLContext>) => Effect.Effect<LiveStoreContextRunning, UnexpectedError | Cause.TimeoutException, DeferredStoreContext | Scope.Scope |
|
|
40
|
+
export declare const makeLiveStoreContext: <GraphQLContext extends BaseGraphQLContext>({ schema, storeId, graphQLOptions: graphQLOptions_, boot, adapter, disableDevtools, onBootStatus, batchUpdates, }: LiveStoreContextProps<GraphQLContext>) => Effect.Effect<LiveStoreContextRunning["Type"], UnexpectedError | Cause.TimeoutException, DeferredStoreContext | Scope.Scope | OtelTracer.OtelTracer>;
|
|
41
|
+
export {};
|
|
38
42
|
//# sourceMappingURL=LiveStore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LiveStore.d.ts","sourceRoot":"","sources":["../../src/effect/LiveStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAC7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"LiveStore.d.ts","sourceRoot":"","sources":["../../src/effect/LiveStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAC7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AACvE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAY,MAAM,EAAE,KAAK,EAAQ,MAAM,yBAAyB,CAAA;AAC1F,OAAO,KAAK,KAAK,IAAI,MAAM,oBAAoB,CAAA;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAE5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAE5D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,uBAAuB,IAAI,wBAAwB,EAAE,MAAM,yBAAyB,CAAA;;AAEtH,qBAAa,uBAAwB,SAAQ,4BAG1C;IACD,MAAM,CAAC,Y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EAC/B,eAAe,GAAG,KAAK,CAAC,gBAAgB,EACxC,oBAAoB,GAAG,KAAK,CAAC,KAAK,GAAG,UAAU,CAAC,UAAU,CAiCzD,CAAA"}
|
package/dist/effect/LiveStore.js
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { Context, Deferred, Duration, Effect,
|
|
2
|
-
import * as otel from '@opentelemetry/api';
|
|
1
|
+
import { Context, Deferred, Duration, Effect, Layer, pipe } from '@livestore/utils/effect';
|
|
3
2
|
import { createStore } from '../store/create-store.js';
|
|
4
|
-
export
|
|
5
|
-
|
|
3
|
+
export class LiveStoreContextRunning extends Context.Tag('@livestore/livestore/effect/LiveStoreContextRunning')() {
|
|
4
|
+
static fromDeferred = Effect.gen(function* () {
|
|
5
|
+
const deferred = yield* DeferredStoreContext;
|
|
6
|
+
const ctx = yield* deferred;
|
|
7
|
+
return Layer.succeed(LiveStoreContextRunning, ctx);
|
|
8
|
+
}).pipe(Layer.unwrapScoped);
|
|
9
|
+
}
|
|
10
|
+
export class DeferredStoreContext extends Context.Tag('@livestore/livestore/effect/DeferredStoreContext')() {
|
|
11
|
+
}
|
|
6
12
|
export const LiveStoreContextLayer = (props) => Layer.scoped(LiveStoreContextRunning, makeLiveStoreContext(props)).pipe(Layer.withSpan('LiveStore'), Layer.provide(LiveStoreContextDeferred));
|
|
7
13
|
export const LiveStoreContextDeferred = Layer.effect(DeferredStoreContext, Deferred.make());
|
|
8
14
|
export const makeLiveStoreContext = ({ schema, storeId = 'default', graphQLOptions: graphQLOptions_, boot, adapter, disableDevtools, onBootStatus, batchUpdates, }) => pipe(Effect.gen(function* () {
|
|
9
|
-
const otelRootSpanContext = otel.context.active();
|
|
10
|
-
const otelTracer = yield* OtelTracer.Tracer;
|
|
11
15
|
const graphQLOptions = yield* graphQLOptions_
|
|
12
16
|
? Effect.all({ schema: graphQLOptions_.schema, makeContext: Effect.succeed(graphQLOptions_.makeContext) })
|
|
13
17
|
: Effect.succeed(undefined);
|
|
14
|
-
// TODO join fiber set and close tear down parent scope in case of error (Needs refactor with Mike A)
|
|
15
|
-
const fiberSet = yield* FiberSet.make();
|
|
16
18
|
const store = yield* createStore({
|
|
17
19
|
schema,
|
|
18
20
|
storeId,
|
|
19
21
|
graphQLOptions,
|
|
20
|
-
otelOptions: {
|
|
21
|
-
tracer: otelTracer,
|
|
22
|
-
rootSpanContext: otelRootSpanContext,
|
|
23
|
-
},
|
|
24
22
|
boot,
|
|
25
23
|
adapter,
|
|
26
24
|
disableDevtools,
|
|
27
|
-
fiberSet,
|
|
28
25
|
onBootStatus,
|
|
29
26
|
batchUpdates,
|
|
30
27
|
});
|
|
31
28
|
globalThis.__debugLiveStore ??= {};
|
|
32
|
-
|
|
29
|
+
if (Object.keys(globalThis.__debugLiveStore).length === 0) {
|
|
30
|
+
globalThis.__debugLiveStore['_'] = store;
|
|
31
|
+
}
|
|
32
|
+
globalThis.__debugLiveStore[storeId] = store;
|
|
33
33
|
return { stage: 'running', store };
|
|
34
34
|
}), Effect.tapErrorCause((cause) => Effect.flatMap(DeferredStoreContext, (def) => Deferred.failCause(def, cause))), Effect.tap((storeCtx) => Effect.flatMap(DeferredStoreContext, (def) => Deferred.succeed(def, storeCtx))),
|
|
35
35
|
// This can take quite a while.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LiveStore.js","sourceRoot":"","sources":["../../src/effect/LiveStore.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"LiveStore.js","sourceRoot":"","sources":["../../src/effect/LiveStore.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAA;AAK1F,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAItD,MAAM,OAAO,uBAAwB,SAAQ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Store } from './store/store.js';
|
|
2
2
|
export { createStore, createStorePromise, type CreateStoreOptions } from './store/create-store.js';
|
|
3
3
|
export type { BaseGraphQLContext, QueryDebugInfo, RefreshReason, GraphQLOptions, OtelOptions, } from './store/store-types.js';
|
|
4
|
-
export type
|
|
5
|
-
export {
|
|
6
|
-
export { SynchronousDatabaseWrapper, emptyDebugInfo } from './SynchronousDatabaseWrapper.js';
|
|
4
|
+
export { StoreAbort, StoreInterrupted, type LiveStoreContext, type ShutdownDeferred, type LiveStoreContextRunning, } from './store/store-types.js';
|
|
5
|
+
export { SqliteDbWrapper, emptyDebugInfo } from './SqliteDbWrapper.js';
|
|
7
6
|
export type { GetAtom, AtomDebugInfo, RefreshDebugInfo, ReactiveGraphSnapshot, SerializedAtom, SerializedEffect, Atom, Node, Ref, Effect, } from './reactive.js';
|
|
8
7
|
export { LiveStoreComputedQuery, computed } from './live-queries/computed.js';
|
|
9
|
-
export { LiveStoreDbQuery, queryDb } from './live-queries/db.js';
|
|
8
|
+
export { LiveStoreDbQuery, queryDb } from './live-queries/db-query.js';
|
|
10
9
|
export { LiveStoreGraphQLQuery, queryGraphQL } from './live-queries/graphql.js';
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
10
|
+
export { makeRef, type LiveQueryRef } from './live-queries/make-ref.js';
|
|
11
|
+
export { type GetAtomResult, type ReactivityGraph, makeReactivityGraph, type LiveQuery, type GetResult, type LiveQueryAny, type LiveQueryDef, type LiveQueryDefAny, type RcRef, } from './live-queries/base-class.js';
|
|
13
12
|
export { deriveColQuery } from './row-query-utils.js';
|
|
14
13
|
export * from '@livestore/common/schema';
|
|
15
|
-
export { sql, SessionIdSymbol, type BootStatus, type
|
|
14
|
+
export { sql, SessionIdSymbol, type BootStatus, type SqliteDb, type DebugInfo, type MutableDebugInfo, prepareBindValues, type Bindable, type PreparedBindValues, type QueryBuilderAst, type QueryBuilder, type RowQuery, } from '@livestore/common';
|
|
16
15
|
export { SqliteAst, SqliteDsl } from '@livestore/db-schema';
|
|
17
16
|
export { deepEqual } from '@livestore/utils';
|
|
18
17
|
export * from './utils/stack-info.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACxC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,KAAK,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAClG,YAAY,EACV,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,cAAc,EACd,WAAW,GACZ,MAAM,wBAAwB,CAAA;AAE/B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACxC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,KAAK,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAClG,YAAY,EACV,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,cAAc,EACd,WAAW,GACZ,MAAM,wBAAwB,CAAA;AAE/B,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,GAC7B,MAAM,wBAAwB,CAAA;AAE/B,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAEtE,YAAY,EACV,OAAO,EACP,aAAa,EACb,gBAAgB,EAChB,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,IAAI,EACJ,IAAI,EACJ,GAAG,EACH,MAAM,GACP,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAC7E,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACtE,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC/E,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACvE,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,mBAAmB,EACnB,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,KAAK,GACX,MAAM,8BAA8B,CAAA;AAErC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAErD,cAAc,0BAA0B,CAAA;AACxC,OAAO,EACL,GAAG,EACH,eAAe,EACf,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,iBAAiB,EACjB,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,QAAQ,GACd,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAE3D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAE5C,cAAc,uBAAuB,CAAA;AAErC,YAAY,EAAE,aAAa,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export { Store } from './store/store.js';
|
|
2
2
|
export { createStore, createStorePromise } from './store/create-store.js';
|
|
3
|
-
export { StoreAbort, StoreInterrupted } from './store/store-types.js';
|
|
4
|
-
export {
|
|
3
|
+
export { StoreAbort, StoreInterrupted, } from './store/store-types.js';
|
|
4
|
+
export { SqliteDbWrapper, emptyDebugInfo } from './SqliteDbWrapper.js';
|
|
5
5
|
export { LiveStoreComputedQuery, computed } from './live-queries/computed.js';
|
|
6
|
-
export { LiveStoreDbQuery, queryDb } from './live-queries/db.js';
|
|
6
|
+
export { LiveStoreDbQuery, queryDb } from './live-queries/db-query.js';
|
|
7
7
|
export { LiveStoreGraphQLQuery, queryGraphQL } from './live-queries/graphql.js';
|
|
8
|
+
export { makeRef } from './live-queries/make-ref.js';
|
|
8
9
|
export { makeReactivityGraph, } from './live-queries/base-class.js';
|
|
9
|
-
export { globalReactivityGraph } from './global-state.js';
|
|
10
10
|
export { deriveColQuery } from './row-query-utils.js';
|
|
11
11
|
export * from '@livestore/common/schema';
|
|
12
12
|
export { sql, SessionIdSymbol, prepareBindValues, } from '@livestore/common';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACxC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAA2B,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACxC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAA2B,MAAM,yBAAyB,CAAA;AASlG,OAAO,EACL,UAAU,EACV,gBAAgB,GAIjB,MAAM,wBAAwB,CAAA;AAE/B,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AActE,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAA;AAC7E,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACtE,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC/E,OAAO,EAAE,OAAO,EAAqB,MAAM,4BAA4B,CAAA;AACvE,OAAO,EAGL,mBAAmB,GAOpB,MAAM,8BAA8B,CAAA;AAErC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAErD,cAAc,0BAA0B,CAAA;AACxC,OAAO,EACL,GAAG,EACH,eAAe,EAKf,iBAAiB,GAMlB,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAE3D,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAE5C,cAAc,uBAAuB,CAAA"}
|
|
@@ -1,22 +1,63 @@
|
|
|
1
1
|
import type { QueryInfo } from '@livestore/common';
|
|
2
2
|
import type * as otel from '@opentelemetry/api';
|
|
3
|
-
import
|
|
3
|
+
import * as RG from '../reactive.js';
|
|
4
4
|
import type { Store } from '../store/store.js';
|
|
5
5
|
import type { QueryDebugInfo, RefreshReason } from '../store/store-types.js';
|
|
6
6
|
import type { StackInfo } from '../utils/stack-info.js';
|
|
7
|
-
export type ReactivityGraph = ReactiveGraph<RefreshReason, QueryDebugInfo,
|
|
7
|
+
export type ReactivityGraph = RG.ReactiveGraph<RefreshReason, QueryDebugInfo, ReactivityGraphContext>;
|
|
8
8
|
export declare const makeReactivityGraph: () => ReactivityGraph;
|
|
9
|
-
export
|
|
9
|
+
export declare const defCounterRef: {
|
|
10
|
+
current: number;
|
|
11
|
+
};
|
|
12
|
+
type LiveQueryDefHash = string;
|
|
13
|
+
export type LiveQueryRCMap = Map<LiveQueryDefHash, RcRef<LiveQueryAny | ILiveQueryRef<any>>>;
|
|
14
|
+
export type ReactivityGraphContext = {
|
|
10
15
|
store: Store;
|
|
16
|
+
liveQueryRCMap: LiveQueryRCMap;
|
|
17
|
+
/** Back-reference to the reactivity graph for convenience */
|
|
18
|
+
reactivityGraph: WeakRef<ReactivityGraph>;
|
|
11
19
|
otelTracer: otel.Tracer;
|
|
12
20
|
rootOtelContext: otel.Context;
|
|
13
21
|
effectsWrapper: (run: () => void) => void;
|
|
14
22
|
};
|
|
15
|
-
export type
|
|
16
|
-
export type GetResult<TQuery extends LiveQueryAny> = TQuery extends LiveQuery<infer TResult, infer _1> ? TResult : unknown;
|
|
23
|
+
export type GetResult<TQuery extends LiveQueryDefAny | LiveQueryAny> = TQuery extends LiveQuery<infer TResult, infer _1> ? TResult : TQuery extends LiveQueryDef<infer TResult, infer _1> ? TResult : unknown;
|
|
17
24
|
export type LiveQueryAny = LiveQuery<any, QueryInfo>;
|
|
25
|
+
export type LiveQueryDefAny = LiveQueryDef<any, any>;
|
|
26
|
+
export interface ILiveQueryRefDef<T> {
|
|
27
|
+
_tag: 'live-ref-def';
|
|
28
|
+
defaultValue: T;
|
|
29
|
+
make: (ctx: ReactivityGraphContext) => RcRef<ILiveQueryRef<T>>;
|
|
30
|
+
}
|
|
31
|
+
export interface ILiveQueryRef<T> {
|
|
32
|
+
_tag: 'live-ref';
|
|
33
|
+
reactivityGraph: ReactivityGraph;
|
|
34
|
+
ref: RG.Ref<T, ReactivityGraphContext, RefreshReason>;
|
|
35
|
+
set: (value: T) => void;
|
|
36
|
+
get: () => T;
|
|
37
|
+
destroy: () => void;
|
|
38
|
+
}
|
|
18
39
|
export declare const TypeId: unique symbol;
|
|
19
40
|
export type TypeId = typeof TypeId;
|
|
41
|
+
export interface RcRef<T> {
|
|
42
|
+
rc: number;
|
|
43
|
+
value: T;
|
|
44
|
+
deref: () => void;
|
|
45
|
+
}
|
|
46
|
+
export type DepKey = string | number | ReadonlyArray<string | number | undefined | null>;
|
|
47
|
+
export declare const depsToString: (deps: DepKey) => string;
|
|
48
|
+
export interface LiveQueryDef<TResult, TQueryInfo extends QueryInfo = QueryInfo.None> {
|
|
49
|
+
_tag: 'def';
|
|
50
|
+
/** A unique identifier for the query definition */
|
|
51
|
+
id: number;
|
|
52
|
+
/** Creates a new LiveQuery instance bound to a specific store/reactivityGraph */
|
|
53
|
+
make: (ctx: ReactivityGraphContext, otelContext?: otel.Context) => RcRef<LiveQuery<TResult, TQueryInfo>>;
|
|
54
|
+
label: string;
|
|
55
|
+
hash: string;
|
|
56
|
+
queryInfo: TQueryInfo;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* A LiveQuery is stateful
|
|
60
|
+
*/
|
|
20
61
|
export interface LiveQuery<TResult, TQueryInfo extends QueryInfo = QueryInfo.None> {
|
|
21
62
|
id: number;
|
|
22
63
|
_tag: 'computed' | 'db' | 'graphql';
|
|
@@ -24,15 +65,14 @@ export interface LiveQuery<TResult, TQueryInfo extends QueryInfo = QueryInfo.Non
|
|
|
24
65
|
/** This should only be used on a type-level and doesn't hold any value during runtime */
|
|
25
66
|
'__result!': TResult;
|
|
26
67
|
/** A reactive thunk representing the query results */
|
|
27
|
-
results$: Thunk<TResult,
|
|
68
|
+
results$: RG.Thunk<TResult, ReactivityGraphContext, RefreshReason>;
|
|
28
69
|
label: string;
|
|
29
|
-
run: (
|
|
30
|
-
runAndDestroy: (otelContext?: otel.Context, debugRefreshReason?: RefreshReason) => TResult;
|
|
31
|
-
destroy(): void;
|
|
32
|
-
subscribe(onNewValue: (value: TResult) => void, onUnsubsubscribe?: () => void, options?: {
|
|
33
|
-
label?: string;
|
|
70
|
+
run: (args: {
|
|
34
71
|
otelContext?: otel.Context;
|
|
35
|
-
|
|
72
|
+
debugRefreshReason?: RefreshReason;
|
|
73
|
+
}) => TResult;
|
|
74
|
+
destroy: () => void;
|
|
75
|
+
isDestroyed: boolean;
|
|
36
76
|
activeSubscriptions: Set<StackInfo>;
|
|
37
77
|
queryInfo: TQueryInfo;
|
|
38
78
|
runs: number;
|
|
@@ -45,20 +85,23 @@ export declare abstract class LiveStoreQueryBase<TResult, TQueryInfo extends Que
|
|
|
45
85
|
abstract _tag: 'computed' | 'db' | 'graphql';
|
|
46
86
|
/** Human-readable label for the query for debugging */
|
|
47
87
|
abstract label: string;
|
|
48
|
-
abstract results$: Thunk<TResult,
|
|
88
|
+
abstract results$: RG.Thunk<TResult, ReactivityGraphContext, RefreshReason>;
|
|
49
89
|
activeSubscriptions: Set<StackInfo>;
|
|
50
|
-
|
|
90
|
+
abstract readonly reactivityGraph: ReactivityGraph;
|
|
51
91
|
abstract queryInfo: TQueryInfo;
|
|
52
92
|
get runs(): number;
|
|
53
93
|
executionTimes: number[];
|
|
94
|
+
isDestroyed: boolean;
|
|
54
95
|
abstract destroy: () => void;
|
|
55
|
-
run: (
|
|
56
|
-
runAndDestroy: (otelContext?: otel.Context, debugRefreshReason?: RefreshReason) => TResult;
|
|
57
|
-
subscribe: (onNewValue: (value: TResult) => void, onUnsubsubscribe?: () => void, options?: {
|
|
58
|
-
label?: string;
|
|
96
|
+
run: (args: {
|
|
59
97
|
otelContext?: otel.Context;
|
|
60
|
-
|
|
98
|
+
debugRefreshReason?: RefreshReason;
|
|
99
|
+
}) => TResult;
|
|
100
|
+
protected dependencyQueriesRef: DependencyQueriesRef;
|
|
61
101
|
}
|
|
62
|
-
export type GetAtomResult = <T>(atom: Atom<T, any, RefreshReason> | LiveQuery<T, any>) => T;
|
|
63
|
-
export
|
|
102
|
+
export type GetAtomResult = <T>(atom: RG.Atom<T, any, RefreshReason> | LiveQueryDef<T, any> | LiveQuery<T, any> | ILiveQueryRef<T> | ILiveQueryRefDef<T>, otelContext?: otel.Context | undefined, debugRefreshReason?: RefreshReason | undefined) => T;
|
|
103
|
+
export type DependencyQueriesRef = Set<RcRef<LiveQueryAny | ILiveQueryRef<any>>>;
|
|
104
|
+
export declare const makeGetAtomResult: (get: RG.GetAtom, ctx: ReactivityGraphContext, otelContext: otel.Context, dependencyQueriesRef: DependencyQueriesRef) => GetAtomResult;
|
|
105
|
+
export declare const withRCMap: <T extends LiveQueryAny | ILiveQueryRef<any>>(id: string, make: (ctx: ReactivityGraphContext, otelContext?: otel.Context) => T) => ((ctx: ReactivityGraphContext, otelContext?: otel.Context) => RcRef<T>);
|
|
106
|
+
export {};
|
|
64
107
|
//# sourceMappingURL=base-class.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-class.d.ts","sourceRoot":"","sources":["../../src/live-queries/base-class.ts"],"names":[],"mappings":"AAAA,OAA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