@rocicorp/zero 0.24.2025090402 → 0.24.2025091200
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/{chunk-P6JME3HC.js → chunk-6XNI6IVJ.js} +233 -135
- package/out/chunk-6XNI6IVJ.js.map +7 -0
- package/out/chunk-ASRS2LFV.js +35 -0
- package/out/chunk-ASRS2LFV.js.map +7 -0
- package/out/{chunk-G442PJSB.js → chunk-K5ZSWG54.js} +343 -327
- package/out/chunk-K5ZSWG54.js.map +7 -0
- package/out/{chunk-4NLQ25GZ.js → chunk-KXV3BZ4U.js} +3 -3
- package/out/{inspector-4ALIZXAU.js → inspector-ZZSIUMBB.js} +36 -6
- package/out/inspector-ZZSIUMBB.js.map +7 -0
- package/out/react-native.js +276 -278
- package/out/react-native.js.map +4 -4
- package/out/react.js +98 -35
- package/out/react.js.map +2 -2
- package/out/replicache/src/connection-loop.d.ts.map +1 -1
- package/out/replicache/src/deleted-clients.d.ts +17 -10
- package/out/replicache/src/deleted-clients.d.ts.map +1 -1
- package/out/replicache/src/kv/expo-sqlite/store.d.ts +11 -0
- package/out/replicache/src/kv/expo-sqlite/store.d.ts.map +1 -0
- package/out/replicache/src/kv/idb-store.d.ts.map +1 -1
- package/out/replicache/src/kv/mem-store.d.ts.map +1 -1
- package/out/replicache/src/kv/op-sqlite/store.d.ts +14 -0
- package/out/replicache/src/kv/op-sqlite/store.d.ts.map +1 -0
- package/out/replicache/src/kv/op-sqlite/types.d.ts +13 -0
- package/out/replicache/src/kv/op-sqlite/types.d.ts.map +1 -0
- package/out/replicache/src/kv/read-impl.d.ts.map +1 -1
- package/out/replicache/src/kv/sqlite-store.d.ts +37 -63
- package/out/replicache/src/kv/sqlite-store.d.ts.map +1 -1
- package/out/replicache/src/kv/throw-if-closed.d.ts +12 -0
- package/out/replicache/src/kv/throw-if-closed.d.ts.map +1 -0
- package/out/replicache/src/kv/write-impl-base.d.ts.map +1 -1
- package/out/replicache/src/kv/write-impl.d.ts.map +1 -1
- package/out/replicache/src/persist/client-gc.d.ts.map +1 -1
- package/out/replicache/src/persist/client-group-gc.d.ts +2 -3
- package/out/replicache/src/persist/client-group-gc.d.ts.map +1 -1
- package/out/replicache/src/persist/clients.d.ts +2 -1
- package/out/replicache/src/persist/clients.d.ts.map +1 -1
- package/out/replicache/src/persist/collect-idb-databases.d.ts.map +1 -1
- package/out/replicache/src/replicache-impl.d.ts.map +1 -1
- package/out/solid.js +65 -20
- package/out/solid.js.map +3 -3
- package/out/zero/package.json +1 -1
- package/out/zero/src/zero-cache-dev.js +4 -0
- package/out/zero/src/zero-cache-dev.js.map +1 -1
- package/out/zero-cache/src/auth/write-authorizer.js +1 -1
- package/out/zero-cache/src/auth/write-authorizer.js.map +1 -1
- package/out/zero-cache/src/config/normalize.d.ts +1 -0
- package/out/zero-cache/src/config/normalize.d.ts.map +1 -1
- package/out/zero-cache/src/config/normalize.js +6 -0
- package/out/zero-cache/src/config/normalize.js.map +1 -1
- package/out/zero-cache/src/config/zero-config.d.ts +11 -0
- package/out/zero-cache/src/config/zero-config.d.ts.map +1 -1
- package/out/zero-cache/src/config/zero-config.js +53 -1
- package/out/zero-cache/src/config/zero-config.js.map +1 -1
- package/out/zero-cache/src/custom-queries/transform-query.d.ts.map +1 -1
- package/out/zero-cache/src/custom-queries/transform-query.js +4 -0
- package/out/zero-cache/src/custom-queries/transform-query.js.map +1 -1
- package/out/zero-cache/src/server/anonymous-otel-start.d.ts +1 -0
- package/out/zero-cache/src/server/anonymous-otel-start.d.ts.map +1 -1
- package/out/zero-cache/src/server/anonymous-otel-start.js +41 -2
- package/out/zero-cache/src/server/anonymous-otel-start.js.map +1 -1
- package/out/zero-cache/src/server/inspector-delegate.d.ts +9 -0
- package/out/zero-cache/src/server/inspector-delegate.d.ts.map +1 -1
- package/out/zero-cache/src/server/inspector-delegate.js +18 -0
- package/out/zero-cache/src/server/inspector-delegate.js.map +1 -1
- package/out/zero-cache/src/server/otel-diag-logger.d.ts +16 -0
- package/out/zero-cache/src/server/otel-diag-logger.d.ts.map +1 -0
- package/out/zero-cache/src/server/otel-diag-logger.js +76 -0
- package/out/zero-cache/src/server/otel-diag-logger.js.map +1 -0
- package/out/zero-cache/src/server/otel-start.d.ts.map +1 -1
- package/out/zero-cache/src/server/otel-start.js +13 -13
- package/out/zero-cache/src/server/otel-start.js.map +1 -1
- package/out/zero-cache/src/server/reaper.js +5 -1
- package/out/zero-cache/src/server/reaper.js.map +1 -1
- package/out/zero-cache/src/server/syncer.js +3 -3
- package/out/zero-cache/src/server/syncer.js.map +1 -1
- package/out/zero-cache/src/services/analyze.d.ts +1 -1
- package/out/zero-cache/src/services/analyze.d.ts.map +1 -1
- package/out/zero-cache/src/services/analyze.js +6 -6
- package/out/zero-cache/src/services/analyze.js.map +1 -1
- package/out/zero-cache/src/services/heapz.d.ts +1 -1
- package/out/zero-cache/src/services/heapz.d.ts.map +1 -1
- package/out/zero-cache/src/services/heapz.js +2 -2
- package/out/zero-cache/src/services/heapz.js.map +1 -1
- package/out/zero-cache/src/services/mutagen/pusher.d.ts +12 -4
- package/out/zero-cache/src/services/mutagen/pusher.d.ts.map +1 -1
- package/out/zero-cache/src/services/statz.d.ts +1 -1
- package/out/zero-cache/src/services/statz.d.ts.map +1 -1
- package/out/zero-cache/src/services/statz.js +3 -3
- package/out/zero-cache/src/services/statz.js.map +1 -1
- package/out/zero-cache/src/services/view-syncer/cvr-purger.d.ts +7 -1
- package/out/zero-cache/src/services/view-syncer/cvr-purger.d.ts.map +1 -1
- package/out/zero-cache/src/services/view-syncer/cvr-purger.js +17 -8
- package/out/zero-cache/src/services/view-syncer/cvr-purger.js.map +1 -1
- package/out/zero-cache/src/services/view-syncer/cvr-store.d.ts +0 -1
- package/out/zero-cache/src/services/view-syncer/cvr-store.d.ts.map +1 -1
- package/out/zero-cache/src/services/view-syncer/cvr-store.js +6 -19
- package/out/zero-cache/src/services/view-syncer/cvr-store.js.map +1 -1
- package/out/zero-cache/src/services/view-syncer/cvr.d.ts +0 -1
- package/out/zero-cache/src/services/view-syncer/cvr.d.ts.map +1 -1
- package/out/zero-cache/src/services/view-syncer/cvr.js +19 -8
- package/out/zero-cache/src/services/view-syncer/cvr.js.map +1 -1
- package/out/zero-cache/src/services/view-syncer/pipeline-driver.d.ts +1 -1
- package/out/zero-cache/src/services/view-syncer/pipeline-driver.d.ts.map +1 -1
- package/out/zero-cache/src/services/view-syncer/view-syncer.d.ts +1 -1
- package/out/zero-cache/src/services/view-syncer/view-syncer.d.ts.map +1 -1
- package/out/zero-cache/src/services/view-syncer/view-syncer.js +30 -7
- package/out/zero-cache/src/services/view-syncer/view-syncer.js.map +1 -1
- package/out/zero-client/src/client/active-clients-manager.d.ts +2 -1
- package/out/zero-client/src/client/active-clients-manager.d.ts.map +1 -1
- package/out/zero-client/src/client/delete-clients-manager.d.ts +3 -3
- package/out/zero-client/src/client/delete-clients-manager.d.ts.map +1 -1
- package/out/zero-client/src/client/inspector/inspector.d.ts.map +1 -1
- package/out/zero-client/src/client/query-manager.d.ts +2 -0
- package/out/zero-client/src/client/query-manager.d.ts.map +1 -1
- package/out/zero-client/src/client/zero.d.ts +2 -2
- package/out/zero-client/src/client/zero.d.ts.map +1 -1
- package/out/zero-protocol/src/down.d.ts +5 -0
- package/out/zero-protocol/src/down.d.ts.map +1 -1
- package/out/zero-protocol/src/inspect-down.d.ts +17 -0
- package/out/zero-protocol/src/inspect-down.d.ts.map +1 -1
- package/out/zero-protocol/src/inspect-down.js +5 -1
- package/out/zero-protocol/src/inspect-down.js.map +1 -1
- package/out/zero-protocol/src/inspect-up.d.ts +39 -10
- package/out/zero-protocol/src/inspect-up.d.ts.map +1 -1
- package/out/zero-protocol/src/inspect-up.js +10 -3
- package/out/zero-protocol/src/inspect-up.js.map +1 -1
- package/out/zero-protocol/src/protocol-version.d.ts +1 -1
- package/out/zero-protocol/src/protocol-version.d.ts.map +1 -1
- package/out/zero-protocol/src/protocol-version.js +2 -1
- package/out/zero-protocol/src/protocol-version.js.map +1 -1
- package/out/zero-protocol/src/up.d.ts +10 -1
- package/out/zero-protocol/src/up.d.ts.map +1 -1
- package/out/zero-react/src/use-query.d.ts +20 -3
- package/out/zero-react/src/use-query.d.ts.map +1 -1
- package/out/zero-react-native/src/mod.d.ts +2 -2
- package/out/zero-react-native/src/mod.d.ts.map +1 -1
- package/out/zero-solid/src/solid-view.d.ts +24 -5
- package/out/zero-solid/src/solid-view.d.ts.map +1 -1
- package/out/zero-solid/src/use-query.d.ts.map +1 -1
- package/out/zero.js +4 -4
- package/out/zql/src/ivm/array-view.d.ts +2 -1
- package/out/zql/src/ivm/array-view.d.ts.map +1 -1
- package/out/zql/src/ivm/array-view.js +16 -5
- package/out/zql/src/ivm/array-view.js.map +1 -1
- package/out/zql/src/ivm/view.d.ts +2 -1
- package/out/zql/src/ivm/view.d.ts.map +1 -1
- package/out/zql/src/query/query-delegate.d.ts +2 -1
- package/out/zql/src/query/query-delegate.d.ts.map +1 -1
- package/out/zql/src/query/query-impl.d.ts.map +1 -1
- package/out/zql/src/query/query-impl.js +17 -5
- package/out/zql/src/query/query-impl.js.map +1 -1
- package/out/zql/src/query/typed-view.d.ts +3 -2
- package/out/zql/src/query/typed-view.d.ts.map +1 -1
- package/out/{zero-cache/src/services/view-syncer → zqlite/src}/database-storage.d.ts +2 -2
- package/out/zqlite/src/database-storage.d.ts.map +1 -0
- package/out/{zero-cache/src/services/view-syncer → zqlite/src}/database-storage.js +1 -1
- package/out/zqlite/src/database-storage.js.map +1 -0
- package/package.json +1 -1
- package/out/chunk-G442PJSB.js.map +0 -7
- package/out/chunk-MKB4RXL3.js +0 -15
- package/out/chunk-MKB4RXL3.js.map +0 -7
- package/out/chunk-P6JME3HC.js.map +0 -7
- package/out/inspector-4ALIZXAU.js.map +0 -7
- package/out/replicache/src/expo/store.d.ts +0 -4
- package/out/replicache/src/expo/store.d.ts.map +0 -1
- package/out/zero-cache/src/services/view-syncer/database-storage.d.ts.map +0 -1
- package/out/zero-cache/src/services/view-syncer/database-storage.js.map +0 -1
- /package/out/{chunk-4NLQ25GZ.js.map → chunk-KXV3BZ4U.js.map} +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SQLiteStoreOptions } from '../sqlite-store.ts';
|
|
2
|
+
import type { StoreProvider } from '../store.ts';
|
|
3
|
+
export type OpSQLiteStoreOptions = SQLiteStoreOptions & {
|
|
4
|
+
location?: 'default' | 'Library' | 'Documents' | 'Temporary';
|
|
5
|
+
encryptionKey?: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Creates a StoreProvider for SQLite-based stores using @op-engineering/op-sqlite.
|
|
9
|
+
* Supports shared connections between multiple store instances with the same name,
|
|
10
|
+
* providing efficient resource utilization and proper transaction isolation.
|
|
11
|
+
* Uses parameterized queries for safety and performance.
|
|
12
|
+
*/
|
|
13
|
+
export declare function opSQLiteStoreProvider(opts?: OpSQLiteStoreOptions): StoreProvider;
|
|
14
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../../../replicache/src/kv/op-sqlite/store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,aAAa,CAAC;AAG/C,MAAM,MAAM,oBAAoB,GAAG,kBAAkB,GAAG;IAEtD,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,WAAW,CAAC;IAC7D,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AASF;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,CAAC,EAAE,oBAAoB,GAC1B,aAAa,CAUf"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface DB {
|
|
2
|
+
close: () => void;
|
|
3
|
+
delete: (location?: string) => void;
|
|
4
|
+
executeRaw: (query: string, params?: string[]) => Promise<string[][]>;
|
|
5
|
+
executeRawSync: (query: string, params?: string[]) => string[][];
|
|
6
|
+
}
|
|
7
|
+
export type OpenFunction = (params: {
|
|
8
|
+
name: string;
|
|
9
|
+
location?: string;
|
|
10
|
+
encryptionKey?: string;
|
|
11
|
+
}) => DB;
|
|
12
|
+
export declare const open: OpenFunction;
|
|
13
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../replicache/src/kv/op-sqlite/types.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,EAAE;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACtE,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,MAAM,EAAE,EAAE,CAAC;CAClE;AAED,MAAM,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,KAAK,EAAE,CAAC;AAGT,eAAO,MAAM,IAAI,EAAE,YAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-impl.d.ts","sourceRoot":"","sources":["../../../../../replicache/src/kv/read-impl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"read-impl.d.ts","sourceRoot":"","sources":["../../../../../replicache/src/kv/read-impl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,YAAY,CAAC;AAGrC,qBAAa,QAAS,YAAW,IAAI;;gBAKvB,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,EAAE,OAAO,EAAE,MAAM,IAAI;IAKlE,OAAO;IAKP,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAOlC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC;CAMvD"}
|
|
@@ -8,9 +8,8 @@ import type { Read, Store, Write } from './store.ts';
|
|
|
8
8
|
* `finalize` releases the statement.
|
|
9
9
|
*/
|
|
10
10
|
export interface PreparedStatement {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
finalize(): void;
|
|
11
|
+
firstValue(params: string[]): Promise<unknown>;
|
|
12
|
+
exec(params: string[]): Promise<void>;
|
|
14
13
|
}
|
|
15
14
|
export interface SQLiteDatabase {
|
|
16
15
|
/**
|
|
@@ -26,85 +25,60 @@ export interface SQLiteDatabase {
|
|
|
26
25
|
* E.g. `const stmt = db.prepare("SELECT * FROM todos WHERE id=?");`
|
|
27
26
|
*/
|
|
28
27
|
prepare(sql: string): PreparedStatement;
|
|
28
|
+
execSync(sql: string): void;
|
|
29
29
|
}
|
|
30
|
-
type
|
|
31
|
-
begin: PreparedStatement;
|
|
32
|
-
beginImmediate: PreparedStatement;
|
|
33
|
-
commit: PreparedStatement;
|
|
34
|
-
rollback: PreparedStatement;
|
|
35
|
-
};
|
|
36
|
-
type SQLiteRWPreparedStatements = {
|
|
37
|
-
get: PreparedStatement;
|
|
38
|
-
put: PreparedStatement;
|
|
39
|
-
del: PreparedStatement;
|
|
40
|
-
};
|
|
41
|
-
type SQLitePreparedStatements = SQLiteTransactionPreparedStatements & SQLiteRWPreparedStatements;
|
|
30
|
+
export type CreateSQLiteDatabase = (filename: string, opts?: SQLiteStoreOptions) => SQLiteDatabase;
|
|
42
31
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* interface using a single 'entry' table with key-value pairs.
|
|
48
|
-
*
|
|
49
|
-
* The store uses a single RWLock to prevent concurrent read and write operations.
|
|
50
|
-
*
|
|
51
|
-
* The store also uses a pool of read connections to allow concurrent reads with separate transactions.
|
|
32
|
+
* SQLite-based implementation of the Store interface using a configurable delegate.
|
|
33
|
+
* Supports shared connections between multiple store instances with the same name,
|
|
34
|
+
* providing efficient resource utilization and proper transaction isolation.
|
|
35
|
+
* Uses parameterized queries for safety and performance.
|
|
52
36
|
*/
|
|
53
37
|
export declare class SQLiteStore implements Store {
|
|
54
38
|
#private;
|
|
55
|
-
constructor(name: string,
|
|
39
|
+
constructor(name: string, create: CreateSQLiteDatabase, opts?: SQLiteStoreOptions);
|
|
56
40
|
read(): Promise<Read>;
|
|
57
41
|
write(): Promise<Write>;
|
|
58
42
|
close(): Promise<void>;
|
|
59
43
|
get closed(): boolean;
|
|
60
44
|
}
|
|
61
|
-
declare
|
|
45
|
+
export declare function safeFilename(name: string): string;
|
|
46
|
+
export type PreparedStatements = {
|
|
47
|
+
has: PreparedStatement;
|
|
48
|
+
get: PreparedStatement;
|
|
49
|
+
put: PreparedStatement;
|
|
50
|
+
del: PreparedStatement;
|
|
51
|
+
};
|
|
52
|
+
export interface SQLiteStoreOptions {
|
|
53
|
+
busyTimeout?: number;
|
|
54
|
+
journalMode?: 'WAL' | 'DELETE';
|
|
55
|
+
synchronous?: 'NORMAL' | 'FULL';
|
|
56
|
+
readUncommitted?: boolean;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Common database setup logic shared between expo-sqlite and op-sqlite implementations.
|
|
60
|
+
* Configures SQLite pragmas, creates the entry table, and prepares common statements.
|
|
61
|
+
*/
|
|
62
|
+
export declare function setupDatabase(delegate: SQLiteDatabase, opts?: SQLiteStoreOptions): PreparedStatements;
|
|
63
|
+
export declare class SQLiteStoreRead implements Read {
|
|
62
64
|
#private;
|
|
63
|
-
|
|
64
|
-
constructor(preparedStatements: SQLitePreparedStatements, release: () => void);
|
|
65
|
+
constructor(release: () => void, preparedStatements: PreparedStatements);
|
|
65
66
|
has(key: string): Promise<boolean>;
|
|
66
67
|
get(key: string): Promise<ReadonlyJSONValue | undefined>;
|
|
67
|
-
protected _release(): void;
|
|
68
|
-
get closed(): boolean;
|
|
69
|
-
}
|
|
70
|
-
export declare class SQLiteStoreRead extends SQLiteStoreRWBase implements Read {
|
|
71
|
-
constructor(preparedStatements: SQLitePreparedStatements, release: () => void);
|
|
72
68
|
release(): void;
|
|
69
|
+
get closed(): boolean;
|
|
73
70
|
}
|
|
74
|
-
export declare class
|
|
71
|
+
export declare class SQLiteWrite implements Write {
|
|
75
72
|
#private;
|
|
76
|
-
constructor(
|
|
73
|
+
constructor(release: () => void, dbDelegate: SQLiteDatabase, preparedStatements: PreparedStatements);
|
|
74
|
+
has(key: string): Promise<boolean>;
|
|
75
|
+
get(key: string): Promise<ReadonlyJSONValue | undefined>;
|
|
77
76
|
put(key: string, value: ReadonlyJSONValue): Promise<void>;
|
|
78
77
|
del(key: string): Promise<void>;
|
|
79
78
|
commit(): Promise<void>;
|
|
80
79
|
release(): void;
|
|
80
|
+
get closed(): boolean;
|
|
81
81
|
}
|
|
82
|
-
export
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
export declare function safeFilename(name: string): string;
|
|
86
|
-
export type SQLiteDatabaseManagerOptions = {
|
|
87
|
-
/**
|
|
88
|
-
* The number of read connections to keep open.
|
|
89
|
-
*
|
|
90
|
-
* This must be greater than 1 to support concurrent reads.
|
|
91
|
-
*/
|
|
92
|
-
readPoolSize: number;
|
|
93
|
-
busyTimeout?: number | undefined;
|
|
94
|
-
journalMode?: 'WAL' | 'DELETE' | undefined;
|
|
95
|
-
synchronous?: 'NORMAL' | 'FULL' | undefined;
|
|
96
|
-
readUncommitted?: boolean | undefined;
|
|
97
|
-
};
|
|
98
|
-
export declare class SQLiteDatabaseManager {
|
|
99
|
-
#private;
|
|
100
|
-
constructor(dbm: GenericSQLiteDatabaseManager);
|
|
101
|
-
clearAllStoresForTesting(): void;
|
|
102
|
-
open(name: string, opts: Omit<SQLiteDatabaseManagerOptions, 'poolSize'>): {
|
|
103
|
-
db: SQLiteDatabase;
|
|
104
|
-
preparedStatements: SQLitePreparedStatements;
|
|
105
|
-
};
|
|
106
|
-
close(name: string): void;
|
|
107
|
-
destroy(name: string): void;
|
|
108
|
-
}
|
|
109
|
-
export {};
|
|
82
|
+
export declare function clearAllNamedStoresForTesting(): void;
|
|
83
|
+
export declare function dropStore(name: string, createDelegate: (filename: string, opts?: SQLiteStoreOptions) => SQLiteDatabase): Promise<void>;
|
|
110
84
|
//# sourceMappingURL=sqlite-store.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlite-store.d.ts","sourceRoot":"","sources":["../../../../../replicache/src/kv/sqlite-store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"sqlite-store.d.ts","sourceRoot":"","sources":["../../../../../replicache/src/kv/sqlite-store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,6BAA6B,CAAC;AAEnE,OAAO,KAAK,EAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAC,MAAM,YAAY,CAAC;AAMnD;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/C,IAAI,CAAC,MAAM,EAAE,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actionClosed(transaction: {
|
|
5
|
+
readonly closed: boolean;
|
|
6
|
+
}): void;
|
|
7
|
+
export declare function transactionIsClosedRejection(): Promise<never>;
|
|
8
|
+
export declare function maybeTransactionIsClosedRejection(transaction: {
|
|
9
|
+
readonly closed: boolean;
|
|
10
|
+
}): Promise<never> | undefined;
|
|
11
|
+
export declare function storeIsClosedRejection(): Promise<never>;
|
|
12
|
+
//# sourceMappingURL=throw-if-closed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"throw-if-closed.d.ts","sourceRoot":"","sources":["../../../../../replicache/src/kv/throw-if-closed.ts"],"names":[],"mappings":"AAQA,wBAAgB,kBAAkB,CAAC,KAAK,EAAE;IAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;CAAC,GAAG,IAAI,CAI1E;AAED,wBAAgB,wBAAwB,CAAC,WAAW,EAAE;IACpD,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAC1B,GAAG,IAAI,CAIP;AAED,wBAAgB,4BAA4B,mBAE3C;AAED,wBAAgB,iCAAiC,CAAC,WAAW,EAAE;IAC7D,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAC1B,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,SAAS,CAE7B;AAED,wBAAgB,sBAAsB,mBAErC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-impl-base.d.ts","sourceRoot":"","sources":["../../../../../replicache/src/kv/write-impl-base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,6BAA6B,CAAC;AAMnE,OAAO,EACL,KAAK,eAAe,EAGrB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"write-impl-base.d.ts","sourceRoot":"","sources":["../../../../../replicache/src/kv/write-impl-base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,6BAA6B,CAAC;AAMnE,OAAO,EACL,KAAK,eAAe,EAGrB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,YAAY,CAAC;AAMrC,eAAO,MAAM,cAAc,eAAW,CAAC;AACvC,KAAK,cAAc,GAAG,OAAO,cAAc,CAAC;AAE5C,qBAAa,aAAa;;IACxB,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,GAAG,cAAc,CAAC,CAC9D;gBAGA,IAAI,EAAE,IAAI;IAItB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAc5B,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC;IAiB5D,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB;IAOzC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAO/B,OAAO,IAAI,IAAI;IAIf,IAAI,MAAM,IAAI,OAAO,CAEpB;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write-impl.d.ts","sourceRoot":"","sources":["../../../../../replicache/src/kv/write-impl.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAEvD,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"write-impl.d.ts","sourceRoot":"","sources":["../../../../../replicache/src/kv/write-impl.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAEvD,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAiB,aAAa,EAAC,MAAM,sBAAsB,CAAC;AAEnE,qBAAa,SAAU,SAAQ,aAAc,YAAW,KAAK;;gBAG/C,GAAG,EAAE,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,EAAE,OAAO,EAAE,MAAM,IAAI;IAKlE,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;CAiBxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-gc.d.ts","sourceRoot":"","sources":["../../../../../replicache/src/persist/client-gc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAEjD,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"client-gc.d.ts","sourceRoot":"","sources":["../../../../../replicache/src/persist/client-gc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAEjD,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,iBAAiB,CAAC;AAK3C,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AAE7C,OAAO,KAAK,EAAS,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAC,KAAK,SAAS,EAAyB,MAAM,cAAc,CAAC;AAEpE;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,QAAsB,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,WAAW,QAAgB,CAAC;AAGzC,wBAAgB,iBAAiB,IAAI,OAAO,CAAC,SAAS,CAAC,GAAG,SAAS,CAElE;AAED,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,KAAK,EACf,qBAAqB,EAAE,MAAM,EAC7B,UAAU,EAAE,MAAM,EAClB,gBAAgB,EAAE,gBAAgB,EAClC,EAAE,EAAE,UAAU,EACd,MAAM,EAAE,WAAW,GAClB,IAAI,CAgBN"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import type { LogContext } from '@rocicorp/logger';
|
|
2
2
|
import type { Store } from '../dag/store.ts';
|
|
3
3
|
import { type ClientGroupMap } from './client-groups.ts';
|
|
4
|
-
import { type OnClientsDeleted } from './clients.ts';
|
|
5
4
|
export declare function getLatestGCUpdate(): Promise<ClientGroupMap> | undefined;
|
|
6
|
-
export declare function initClientGroupGC(dagStore: Store, enableMutationRecovery: boolean,
|
|
5
|
+
export declare function initClientGroupGC(dagStore: Store, enableMutationRecovery: boolean, lc: LogContext, signal: AbortSignal): void;
|
|
7
6
|
/**
|
|
8
7
|
* This removes client groups that have no clients and no pending mutations.
|
|
9
8
|
* If {@linkcode enableMutationRecovery} is true, it will keep client groups with
|
|
10
9
|
* pending mutations. If it is false, it will remove client groups even when they
|
|
11
10
|
* have pending mutations.
|
|
12
11
|
*/
|
|
13
|
-
export declare function gcClientGroups(dagStore: Store, enableMutationRecovery: boolean
|
|
12
|
+
export declare function gcClientGroups(dagStore: Store, enableMutationRecovery: boolean): Promise<ClientGroupMap>;
|
|
14
13
|
//# sourceMappingURL=client-group-gc.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-group-gc.d.ts","sourceRoot":"","sources":["../../../../../replicache/src/persist/client-group-gc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAEjD,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,iBAAiB,CAAC;AAG3C,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"client-group-gc.d.ts","sourceRoot":"","sources":["../../../../../replicache/src/persist/client-group-gc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAEjD,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,iBAAiB,CAAC;AAG3C,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAC;AAM5B,wBAAgB,iBAAiB,IAAI,OAAO,CAAC,cAAc,CAAC,GAAG,SAAS,CAEvE;AAED,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,KAAK,EACf,sBAAsB,EAAE,OAAO,EAC/B,EAAE,EAAE,UAAU,EACd,MAAM,EAAE,WAAW,GAClB,IAAI,CAWN;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,KAAK,EACf,sBAAsB,EAAE,OAAO,GAC9B,OAAO,CAAC,cAAc,CAAC,CAuBzB"}
|
|
@@ -3,6 +3,7 @@ import type { Enum } from '../../../shared/src/enum.ts';
|
|
|
3
3
|
import * as valita from '../../../shared/src/valita.ts';
|
|
4
4
|
import type { Read, Store, Write } from '../dag/store.ts';
|
|
5
5
|
import { Commit, type SnapshotMetaDD31 } from '../db/commit.ts';
|
|
6
|
+
import type { DeletedClients } from '../deleted-clients.ts';
|
|
6
7
|
import * as FormatVersion from '../format-version-enum.ts';
|
|
7
8
|
import { type Hash } from '../hash.ts';
|
|
8
9
|
import { type IndexDefinitions } from '../index-defs.ts';
|
|
@@ -107,6 +108,6 @@ export declare function setClients(clients: ClientMap, dagWrite: Write): Promise
|
|
|
107
108
|
/**
|
|
108
109
|
* Callback function for when Replicache has deleted one or more clients.
|
|
109
110
|
*/
|
|
110
|
-
export type OnClientsDeleted = (
|
|
111
|
+
export type OnClientsDeleted = (deletedClients: DeletedClients) => Promise<void>;
|
|
111
112
|
export {};
|
|
112
113
|
//# sourceMappingURL=clients.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clients.d.ts","sourceRoot":"","sources":["../../../../../replicache/src/persist/clients.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAEjD,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,6BAA6B,CAAC;AAEtD,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAC;AAKxD,OAAO,KAAK,EAAC,IAA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,OAAO,EAAE,IAAI,EACb,YAAY,EAAE,MAAM,EAAE,EACtB,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,wBAAwB,CAAC,CA4CnC;AAsBD,wBAAsB,uBAAuB,CAC3C,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,GACT,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC,CAMlC;AAED,wBAAsB,yBAAyB,CAC7C,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,GACT,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAGpC;AAED;;;GAGG;AACH,wBAAsB,SAAS,CAC7B,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,KAAK,GACd,OAAO,CAAC,IAAI,CAAC,CAIf;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAC9B,OAAO,EAAE,SAAS,EAClB,QAAQ,EAAE,KAAK,GACd,OAAO,CAAC,IAAI,CAAC,CAMf;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,CAC7B,cAAc,EAAE,cAAc,KAC3B,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collect-idb-databases.d.ts","sourceRoot":"","sources":["../../../../../replicache/src/persist/collect-idb-databases.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAC,MAAM,kBAAkB,CAAC;AAKpE,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"collect-idb-databases.d.ts","sourceRoot":"","sources":["../../../../../replicache/src/persist/collect-idb-databases.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAC,MAAM,kBAAkB,CAAC;AAKpE,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,iBAAiB,C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ACd,IAAI,CAAC,EAAE,mBAAmB,GAAG,SAAS,iBAWvC;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,CAAC,EAAE,mBAAmB,GAAG,SAAS,GACrC,OAAO,CAAC;IACT,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,OAAO,EAAE,CAAC;CACnB,CAAC,CASD;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,CAAC,EAAE,mBAAmB,GAAG,SAAS;aAtB7B,MAAM,EAAE;YACT,OAAO,EAAE;GAwBlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replicache-impl.d.ts","sourceRoot":"","sources":["../../../../replicache/src/replicache-impl.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,UAAU,EAAC,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"replicache-impl.d.ts","sourceRoot":"","sources":["../../../../replicache/src/replicache-impl.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAQ5D,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,2BAA2B,CAAC;AAG5D,OAAO,EAAe,KAAK,MAAM,EAAC,MAAM,cAAc,CAAC;AACvD,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAsC,KAAK,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAoB/E,OAAO,EAAwB,KAAK,IAAI,EAAgB,MAAM,WAAW,CAAC;AAc1E,OAAO,EACL,KAAK,eAAe,EAErB,MAAM,wBAAwB,CAAC;AAQhC,OAAO,EAGL,KAAK,gBAAgB,EAEtB,MAAM,sBAAsB,CAAC;AAe9B,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACxC,OAAO,EAAC,KAAK,MAAM,EAAY,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EAEV,iBAAiB,EACjB,UAA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gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC,GACnD,MAAM,IAAI;IAWb;;;;;;;;;;;;;;OAcG;IACH,iBAAiB,CAAC,QAAQ,EAAE,oBAAoB,GAAG,MAAM,IAAI;IAC7D,iBAAiB,CAAC,OAAO,SAAS,YAAY,EAC5C,QAAQ,EAAE,uBAAuB,CAAC,OAAO,CAAC,EAC1C,OAAO,CAAC,EAAE,OAAO,GAChB,MAAM,IAAI;IAUb;;;;OAIG;IACH,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,eAAe,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAInE,IAAI,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,CAc5B;IA2LD,gBAAgB,IAAI,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI;IAgB3C;;;;;;;OAOG;IACH,4BAA4B,IAAI,OAAO,CAAC,SAAS,eAAe,EAAE,CAAC;CAGpE"}
|
package/out/solid.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-KXV3BZ4U.js";
|
|
2
2
|
import {
|
|
3
3
|
Zero
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-6XNI6IVJ.js";
|
|
5
|
+
import "./chunk-ASRS2LFV.js";
|
|
6
6
|
import {
|
|
7
7
|
DEFAULT_TTL_MS,
|
|
8
8
|
applyChange,
|
|
9
9
|
idSymbol
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-K5ZSWG54.js";
|
|
11
11
|
import "./chunk-SGW2EIVJ.js";
|
|
12
12
|
import "./chunk-424PT5DM.js";
|
|
13
13
|
|
|
14
14
|
// ../zero-solid/src/use-query.ts
|
|
15
|
-
import { createComputed, onCleanup as onCleanup2 } from "solid-js";
|
|
15
|
+
import { createComputed, createSignal, onCleanup as onCleanup2 } from "solid-js";
|
|
16
16
|
import { createStore } from "solid-js/store";
|
|
17
17
|
|
|
18
18
|
// ../zero-solid/src/solid-view.ts
|
|
@@ -23,6 +23,7 @@ var SolidView = class {
|
|
|
23
23
|
#input;
|
|
24
24
|
#format;
|
|
25
25
|
#onDestroy;
|
|
26
|
+
#refetch;
|
|
26
27
|
#setState;
|
|
27
28
|
// Optimization: if the store is currently empty we build up
|
|
28
29
|
// the view on a plain old JS object stored at #builderRoot, and return
|
|
@@ -35,12 +36,13 @@ var SolidView = class {
|
|
|
35
36
|
#builderRoot;
|
|
36
37
|
#pendingChanges = [];
|
|
37
38
|
#updateTTL;
|
|
38
|
-
constructor(input, onTransactionCommit, format, onDestroy, queryComplete, updateTTL, setState) {
|
|
39
|
+
constructor(input, onTransactionCommit, format, onDestroy, queryComplete, updateTTL, setState, refetch) {
|
|
39
40
|
this.#input = input;
|
|
40
41
|
onTransactionCommit(this.#onTransactionCommit);
|
|
41
42
|
this.#format = format;
|
|
42
43
|
this.#onDestroy = onDestroy;
|
|
43
44
|
this.#updateTTL = updateTTL;
|
|
45
|
+
this.#refetch = refetch;
|
|
44
46
|
input.setOutput(this);
|
|
45
47
|
const initialRoot = this.#createEmptyRoot();
|
|
46
48
|
this.#applyChangesToRoot(
|
|
@@ -50,20 +52,44 @@ var SolidView = class {
|
|
|
50
52
|
);
|
|
51
53
|
this.#setState = setState;
|
|
52
54
|
this.#setState(
|
|
53
|
-
reconcile(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
reconcile(
|
|
56
|
+
[
|
|
57
|
+
initialRoot,
|
|
58
|
+
queryComplete === true ? COMPLETE : "error" in queryComplete ? this.#makeError(queryComplete) : UNKNOWN
|
|
59
|
+
],
|
|
60
|
+
{
|
|
61
|
+
// solidjs's types want a string, but a symbol works
|
|
62
|
+
key: idSymbol
|
|
63
|
+
}
|
|
64
|
+
)
|
|
57
65
|
);
|
|
58
66
|
if (isEmptyRoot(initialRoot)) {
|
|
59
67
|
this.#builderRoot = this.#createEmptyRoot();
|
|
60
68
|
}
|
|
61
|
-
if (queryComplete !== true) {
|
|
69
|
+
if (queryComplete !== true && !("error" in queryComplete)) {
|
|
62
70
|
void queryComplete.then(() => {
|
|
63
71
|
this.#setState((prev) => [prev[0], COMPLETE]);
|
|
72
|
+
}).catch((error) => {
|
|
73
|
+
this.#setState((prev) => [prev[0], this.#makeError(error)]);
|
|
64
74
|
});
|
|
65
75
|
}
|
|
66
76
|
}
|
|
77
|
+
#makeError(error) {
|
|
78
|
+
return {
|
|
79
|
+
type: "error",
|
|
80
|
+
refetch: this.#refetch,
|
|
81
|
+
error: error.error === "app" || error.error === "zero" ? {
|
|
82
|
+
type: "app",
|
|
83
|
+
queryName: error.name,
|
|
84
|
+
details: error.details
|
|
85
|
+
} : {
|
|
86
|
+
type: "http",
|
|
87
|
+
queryName: error.name,
|
|
88
|
+
status: error.status,
|
|
89
|
+
details: error.details
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
}
|
|
67
93
|
destroy() {
|
|
68
94
|
this.#onDestroy();
|
|
69
95
|
}
|
|
@@ -171,7 +197,7 @@ function isEmptyRoot(entry) {
|
|
|
171
197
|
const data = entry[""];
|
|
172
198
|
return data === void 0 || Array.isArray(data) && data.length === 0;
|
|
173
199
|
}
|
|
174
|
-
function createSolidViewFactory(setState) {
|
|
200
|
+
function createSolidViewFactory(setState, refetch) {
|
|
175
201
|
function solidViewFactory(_query, input, format, onDestroy, onTransactionCommit, queryComplete, updateTTL) {
|
|
176
202
|
return new SolidView(
|
|
177
203
|
input,
|
|
@@ -180,7 +206,9 @@ function createSolidViewFactory(setState) {
|
|
|
180
206
|
onDestroy,
|
|
181
207
|
queryComplete,
|
|
182
208
|
updateTTL,
|
|
183
|
-
setState
|
|
209
|
+
setState,
|
|
210
|
+
refetch || (() => {
|
|
211
|
+
})
|
|
184
212
|
);
|
|
185
213
|
}
|
|
186
214
|
solidViewFactory;
|
|
@@ -248,28 +276,45 @@ function useQuery(querySignal, options) {
|
|
|
248
276
|
},
|
|
249
277
|
UNKNOWN
|
|
250
278
|
]);
|
|
279
|
+
const initialRefetchKey = 0;
|
|
280
|
+
const [refetchKey, setRefetchKey] = createSignal(initialRefetchKey);
|
|
281
|
+
const refetch = () => {
|
|
282
|
+
setRefetchKey((k) => k + 1);
|
|
283
|
+
};
|
|
251
284
|
let view = void 0;
|
|
252
285
|
createComputed(
|
|
253
|
-
([
|
|
286
|
+
([
|
|
287
|
+
prevView,
|
|
288
|
+
prevClientID,
|
|
289
|
+
prevQuery,
|
|
290
|
+
prevQueryHash,
|
|
291
|
+
prevTtl,
|
|
292
|
+
prevRefetchKey
|
|
293
|
+
]) => {
|
|
254
294
|
const zero = useZero()();
|
|
295
|
+
const currentRefetchKey = refetchKey();
|
|
255
296
|
const { clientID } = zero;
|
|
256
297
|
const query = querySignal();
|
|
257
298
|
const queryHash = query.hash();
|
|
258
299
|
const ttl = normalize(options)?.ttl ?? DEFAULT_TTL_MS;
|
|
259
|
-
if (!prevView || clientID !== prevClientID || query !== prevQuery && (clientID === void 0 || query.hash() !== prevQueryHash)) {
|
|
300
|
+
if (!prevView || clientID !== prevClientID || prevRefetchKey !== currentRefetchKey || query !== prevQuery && (clientID === void 0 || query.hash() !== prevQueryHash)) {
|
|
260
301
|
if (prevView) {
|
|
261
302
|
prevView.destroy();
|
|
262
303
|
}
|
|
263
|
-
view = zero.materialize(
|
|
304
|
+
view = zero.materialize(
|
|
305
|
+
query,
|
|
306
|
+
createSolidViewFactory(setState, refetch),
|
|
307
|
+
{ ttl }
|
|
308
|
+
);
|
|
264
309
|
} else {
|
|
265
310
|
view = prevView;
|
|
266
311
|
if (ttl !== prevTtl) {
|
|
267
312
|
view.updateTTL(ttl);
|
|
268
313
|
}
|
|
269
314
|
}
|
|
270
|
-
return [view, clientID, query, queryHash, ttl];
|
|
315
|
+
return [view, clientID, query, queryHash, ttl, currentRefetchKey];
|
|
271
316
|
},
|
|
272
|
-
[void 0, void 0, void 0, void 0, void 0]
|
|
317
|
+
[void 0, void 0, void 0, void 0, void 0, initialRefetchKey]
|
|
273
318
|
);
|
|
274
319
|
onCleanup2(() => {
|
|
275
320
|
view?.destroy();
|
|
@@ -281,10 +326,10 @@ function normalize(options) {
|
|
|
281
326
|
}
|
|
282
327
|
|
|
283
328
|
// ../zero-solid/src/use-zero-online.ts
|
|
284
|
-
import { createSignal, onCleanup as onCleanup3 } from "solid-js";
|
|
329
|
+
import { createSignal as createSignal2, onCleanup as onCleanup3 } from "solid-js";
|
|
285
330
|
function useZeroOnline() {
|
|
286
331
|
const zero = useZero()();
|
|
287
|
-
const [online, setOnline] =
|
|
332
|
+
const [online, setOnline] = createSignal2(zero.online);
|
|
288
333
|
const unsubscribe = zero.onOnline(setOnline);
|
|
289
334
|
onCleanup3(unsubscribe);
|
|
290
335
|
return online;
|
package/out/solid.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../zero-solid/src/use-query.ts", "../../zero-solid/src/solid-view.ts", "../../zero-solid/src/use-zero.ts", "../../zero-solid/src/use-zero-online.ts"],
|
|
4
|
-
"sourcesContent": ["import {createComputed, onCleanup, type Accessor} from 'solid-js';\nimport {createStore} from 'solid-js/store';\nimport {\n type ClientID,\n type HumanReadable,\n type Query,\n type Schema,\n type TTL,\n} from '../../zero/src/zero.ts';\nimport {DEFAULT_TTL_MS} from '../../zql/src/query/ttl.ts';\nimport {\n createSolidViewFactory,\n UNKNOWN,\n type QueryResultDetails,\n type SolidView,\n type State,\n} from './solid-view.ts';\nimport {useZero} from './use-zero.ts';\n\nexport type QueryResult<TReturn> = readonly [\n Accessor<HumanReadable<TReturn>>,\n Accessor<QueryResultDetails>,\n];\n\n// Deprecated in 0.22\n/**\n * @deprecated Use {@linkcode UseQueryOptions} instead.\n */\nexport type CreateQueryOptions = {\n ttl?: TTL | undefined;\n};\n\nexport type UseQueryOptions = {\n ttl?: TTL | undefined;\n};\n\n// Deprecated in 0.22\n/**\n * @deprecated Use {@linkcode useQuery} instead.\n */\nexport function createQuery<\n TSchema extends Schema,\n TTable extends keyof TSchema['tables'] & string,\n TReturn,\n>(\n querySignal: Accessor<Query<TSchema, TTable, TReturn>>,\n options?: CreateQueryOptions | Accessor<CreateQueryOptions>,\n): QueryResult<TReturn> {\n return useQuery(querySignal, options);\n}\n\nexport function useQuery<\n TSchema extends Schema,\n TTable extends keyof TSchema['tables'] & string,\n TReturn,\n>(\n querySignal: Accessor<Query<TSchema, TTable, TReturn>>,\n options?: UseQueryOptions | Accessor<UseQueryOptions>,\n): QueryResult<TReturn> {\n const [state, setState] = createStore<State>([\n {\n '': undefined,\n },\n UNKNOWN,\n ]);\n\n let view: SolidView | undefined = undefined;\n // Wrap in in createComputed to ensure a new view is created if the querySignal changes.\n createComputed<\n [\n SolidView | undefined,\n ClientID | undefined,\n Query<TSchema, TTable, TReturn> | undefined,\n string | undefined,\n TTL | undefined,\n ]\n >(\n ([prevView, prevClientID, prevQuery, prevQueryHash, prevTtl]) => {\n const zero = useZero()();\n const {clientID} = zero;\n const query = querySignal();\n const queryHash = query.hash();\n const ttl = normalize(options)?.ttl ?? DEFAULT_TTL_MS;\n if (\n !prevView ||\n clientID !== prevClientID ||\n (query !== prevQuery &&\n (clientID === undefined || query.hash() !== prevQueryHash))\n ) {\n if (prevView) {\n prevView.destroy();\n }\n view = zero.materialize(query, createSolidViewFactory(setState), {ttl});\n } else {\n view = prevView;\n if (ttl !== prevTtl) {\n view.updateTTL(ttl);\n }\n }\n\n return [view, clientID, query, queryHash, ttl];\n },\n [undefined, undefined, undefined, undefined, undefined],\n );\n\n onCleanup(() => {\n view?.destroy();\n });\n\n return [() => state[0][''] as HumanReadable<TReturn>, () => state[1]];\n}\n\nfunction normalize<T>(\n options?: T | Accessor<T | undefined> | undefined,\n): T | undefined {\n return typeof options === 'function' ? (options as Accessor<T>)() : options;\n}\n", "import {produce, reconcile, type SetStoreFunction} from 'solid-js/store';\nimport {\n applyChange,\n type Change,\n type Entry,\n type Format,\n type Input,\n type Node,\n type Output,\n type Query,\n type ResultType,\n type Schema,\n type Stream,\n type TTL,\n type ViewChange,\n type ViewFactory,\n} from '../../zero-client/src/mod.js';\nimport {idSymbol} from '../../zql/src/ivm/view-apply-change.ts';\n\nexport type QueryResultDetails = {\n readonly type: ResultType;\n};\n\nexport type State = [Entry, QueryResultDetails];\n\nexport const COMPLETE: QueryResultDetails = Object.freeze({type: 'complete'});\nexport const UNKNOWN: QueryResultDetails = Object.freeze({type: 'unknown'});\n\nexport class SolidView implements Output {\n readonly #input: Input;\n readonly #format: Format;\n readonly #onDestroy: () => void;\n\n #setState: SetStoreFunction<State>;\n\n // Optimization: if the store is currently empty we build up\n // the view on a plain old JS object stored at #builderRoot, and return\n // that for the new state on transaction commit. This avoids building up\n // large views from scratch via solid produce. The proxy object used by\n // solid produce is slow and in this case we don't care about solid tracking\n // the fine grained changes (everything has changed, it's all new). For a\n // test case with a view with 3000 rows, each row having 2 children, this\n // optimization reduced #applyChanges time from 743ms to 133ms.\n #builderRoot: Entry | undefined;\n #pendingChanges: ViewChange[] = [];\n readonly #updateTTL: (ttl: TTL) => void;\n\n constructor(\n input: Input,\n onTransactionCommit: (cb: () => void) => void,\n format: Format,\n onDestroy: () => void,\n queryComplete: true | Promise<true>,\n updateTTL: (ttl: TTL) => void,\n setState: SetStoreFunction<State>,\n ) {\n this.#input = input;\n onTransactionCommit(this.#onTransactionCommit);\n this.#format = format;\n this.#onDestroy = onDestroy;\n this.#updateTTL = updateTTL;\n\n input.setOutput(this);\n\n const initialRoot = this.#createEmptyRoot();\n this.#applyChangesToRoot(\n input.fetch({}),\n node => ({type: 'add', node}),\n initialRoot,\n );\n\n this.#setState = setState;\n this.#setState(\n reconcile([initialRoot, queryComplete === true ? COMPLETE : UNKNOWN], {\n // solidjs's types want a string, but a symbol works\n key: idSymbol as unknown as string,\n }),\n );\n\n if (isEmptyRoot(initialRoot)) {\n this.#builderRoot = this.#createEmptyRoot();\n }\n\n if (queryComplete !== true) {\n void queryComplete.then(() => {\n this.#setState(prev => [prev[0], COMPLETE]);\n });\n }\n }\n\n destroy(): void {\n this.#onDestroy();\n }\n\n #onTransactionCommit = () => {\n const builderRoot = this.#builderRoot;\n if (builderRoot) {\n if (!isEmptyRoot(builderRoot)) {\n this.#setState(\n 0,\n reconcile(builderRoot, {\n // solidjs's types want a string, but a symbol works\n key: idSymbol as unknown as string,\n }),\n );\n this.#setState(prev => [builderRoot, prev[1]]);\n this.#builderRoot = undefined;\n }\n } else {\n try {\n this.#applyChanges(this.#pendingChanges, c => c);\n } finally {\n this.#pendingChanges = [];\n }\n }\n };\n\n push(change: Change): void {\n // Delay updating the solid store state until the transaction commit\n // (because each update of the solid store is quite expensive). If\n // this.#builderRoot is defined apply the changes to it (we are building\n // from an empty root), otherwise queue the changes to be applied\n // using produce at the end of the transaction but read the relationships\n // now as they are only valid to read when the push is received.\n if (this.#builderRoot) {\n this.#applyChangeToRoot(change, this.#builderRoot);\n } else {\n this.#pendingChanges.push(materializeRelationships(change));\n }\n }\n\n #applyChanges<T>(changes: Iterable<T>, mapper: (v: T) => ViewChange): void {\n this.#setState(\n produce((draftState: State) => {\n this.#applyChangesToRoot<T>(changes, mapper, draftState[0]);\n if (isEmptyRoot(draftState[0])) {\n this.#builderRoot = this.#createEmptyRoot();\n }\n }),\n );\n }\n\n #applyChangesToRoot<T>(\n changes: Iterable<T>,\n mapper: (v: T) => ViewChange,\n root: Entry,\n ) {\n for (const change of changes) {\n this.#applyChangeToRoot(mapper(change), root);\n }\n }\n\n #applyChangeToRoot(change: ViewChange, root: Entry) {\n applyChange(\n root,\n change,\n this.#input.getSchema(),\n '',\n this.#format,\n true /* withIDs */,\n );\n }\n\n #createEmptyRoot(): Entry {\n return {\n '': this.#format.singular ? undefined : [],\n };\n }\n\n updateTTL(ttl: TTL): void {\n this.#updateTTL(ttl);\n }\n}\n\nfunction materializeRelationships(change: Change): ViewChange {\n switch (change.type) {\n case 'add':\n return {type: 'add', node: materializeNodeRelationships(change.node)};\n case 'remove':\n return {type: 'remove', node: materializeNodeRelationships(change.node)};\n case 'child':\n return {\n type: 'child',\n node: {row: change.node.row},\n child: {\n relationshipName: change.child.relationshipName,\n change: materializeRelationships(change.child.change),\n },\n };\n case 'edit':\n return {\n type: 'edit',\n node: {row: change.node.row},\n oldNode: {row: change.oldNode.row},\n };\n }\n}\n\nfunction materializeNodeRelationships(node: Node): Node {\n const relationships: Record<string, () => Stream<Node>> = {};\n for (const relationship in node.relationships) {\n const materialized: Node[] = [];\n for (const n of node.relationships[relationship]()) {\n materialized.push(materializeNodeRelationships(n));\n }\n relationships[relationship] = () => materialized;\n }\n return {\n row: node.row,\n relationships,\n };\n}\n\nfunction isEmptyRoot(entry: Entry) {\n const data = entry[''];\n return data === undefined || (Array.isArray(data) && data.length === 0);\n}\n\nexport function createSolidViewFactory(setState: SetStoreFunction<State>) {\n function solidViewFactory<\n TSchema extends Schema,\n TTable extends keyof TSchema['tables'] & string,\n TReturn,\n >(\n _query: Query<TSchema, TTable, TReturn>,\n input: Input,\n format: Format,\n onDestroy: () => void,\n onTransactionCommit: (cb: () => void) => void,\n queryComplete: true | Promise<true>,\n updateTTL: (ttl: TTL) => void,\n ) {\n return new SolidView(\n input,\n onTransactionCommit,\n format,\n onDestroy,\n queryComplete,\n updateTTL,\n setState,\n );\n }\n\n solidViewFactory satisfies ViewFactory<Schema, string, unknown, unknown>;\n\n return solidViewFactory;\n}\n", "import {\n batch,\n createContext,\n createMemo,\n onCleanup,\n splitProps,\n useContext,\n type Accessor,\n type JSX,\n} from 'solid-js';\nimport {\n Zero,\n type CustomMutatorDefs,\n type Schema,\n type ZeroOptions,\n} from '../../zero/src/zero.ts';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-explicit-any\nconst ZeroContext = createContext<Accessor<Zero<any, any>> | undefined>(\n undefined,\n);\n\nexport function createZero<S extends Schema, MD extends CustomMutatorDefs>(\n options: ZeroOptions<S, MD>,\n): Zero<S, MD> {\n const opts = {\n ...options,\n batchViewUpdates: batch,\n };\n return new Zero(opts);\n}\n\nexport function useZero<\n S extends Schema,\n MD extends CustomMutatorDefs | undefined = undefined,\n>(): () => Zero<S, MD> {\n const zero = useContext(ZeroContext);\n\n if (zero === undefined) {\n throw new Error('useZero must be used within a ZeroProvider');\n }\n return zero;\n}\n\nexport function createUseZero<\n S extends Schema,\n MD extends CustomMutatorDefs | undefined = undefined,\n>() {\n return () => useZero<S, MD>();\n}\n\nexport function ZeroProvider<\n S extends Schema,\n MD extends CustomMutatorDefs | undefined = undefined,\n>(\n props: {children: JSX.Element} & (\n | {\n zero: Zero<S, MD>;\n }\n | ZeroOptions<S, MD>\n ),\n) {\n const zero = createMemo(() => {\n if ('zero' in props) {\n return props.zero;\n }\n const [, options] = splitProps(props, ['children']);\n const createdZero = new Zero({\n ...options,\n batchViewUpdates: batch,\n });\n onCleanup(() => createdZero.close());\n return createdZero;\n });\n\n return ZeroContext.Provider({\n value: zero,\n get children() {\n return props.children;\n },\n });\n}\n", "import {createSignal, onCleanup, type Accessor} from 'solid-js';\nimport {useZero} from './use-zero.ts';\n\n/**\n * Tracks the online status of the current Zero instance.\n *\n * @returns An accessor \u2014 call `online()` to get a reactive `boolean`.\n *\n * @example\n * const online = useZeroOnline();\n *\n * <span>\n * {online() ? 'Online' : 'Offline'}\n * </span>\n */\nexport function useZeroOnline(): Accessor<boolean> {\n const zero = useZero()();\n\n const [online, setOnline] = createSignal<boolean>(zero.online);\n\n const unsubscribe = zero.onOnline(setOnline);\n\n onCleanup(unsubscribe);\n\n return online;\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;AAAA,SAAQ,gBAAgB,aAAAA,kBAA+B;
|
|
6
|
-
"names": ["onCleanup", "onCleanup", "onCleanup", "onCleanup"]
|
|
4
|
+
"sourcesContent": ["import {createComputed, createSignal, onCleanup, type Accessor} from 'solid-js';\nimport {createStore} from 'solid-js/store';\nimport {\n type ClientID,\n type HumanReadable,\n type Query,\n type Schema,\n type TTL,\n} from '../../zero/src/zero.ts';\nimport {DEFAULT_TTL_MS} from '../../zql/src/query/ttl.ts';\nimport {\n createSolidViewFactory,\n UNKNOWN,\n type QueryResultDetails,\n type SolidView,\n type State,\n} from './solid-view.ts';\nimport {useZero} from './use-zero.ts';\n\nexport type QueryResult<TReturn> = readonly [\n Accessor<HumanReadable<TReturn>>,\n Accessor<QueryResultDetails>,\n];\n\n// Deprecated in 0.22\n/**\n * @deprecated Use {@linkcode UseQueryOptions} instead.\n */\nexport type CreateQueryOptions = {\n ttl?: TTL | undefined;\n};\n\nexport type UseQueryOptions = {\n ttl?: TTL | undefined;\n};\n\n// Deprecated in 0.22\n/**\n * @deprecated Use {@linkcode useQuery} instead.\n */\nexport function createQuery<\n TSchema extends Schema,\n TTable extends keyof TSchema['tables'] & string,\n TReturn,\n>(\n querySignal: Accessor<Query<TSchema, TTable, TReturn>>,\n options?: CreateQueryOptions | Accessor<CreateQueryOptions>,\n): QueryResult<TReturn> {\n return useQuery(querySignal, options);\n}\n\nexport function useQuery<\n TSchema extends Schema,\n TTable extends keyof TSchema['tables'] & string,\n TReturn,\n>(\n querySignal: Accessor<Query<TSchema, TTable, TReturn>>,\n options?: UseQueryOptions | Accessor<UseQueryOptions>,\n): QueryResult<TReturn> {\n const [state, setState] = createStore<State>([\n {\n '': undefined,\n },\n UNKNOWN,\n ]);\n const initialRefetchKey = 0;\n const [refetchKey, setRefetchKey] = createSignal(initialRefetchKey);\n\n const refetch = () => {\n setRefetchKey(k => k + 1);\n };\n\n let view: SolidView | undefined = undefined;\n\n // Wrap in in createComputed to ensure a new view is created if the querySignal changes.\n createComputed<\n [\n SolidView | undefined,\n ClientID | undefined,\n Query<TSchema, TTable, TReturn> | undefined,\n string | undefined,\n TTL | undefined,\n number,\n ]\n >(\n ([\n prevView,\n prevClientID,\n prevQuery,\n prevQueryHash,\n prevTtl,\n prevRefetchKey,\n ]) => {\n const zero = useZero()();\n const currentRefetchKey = refetchKey(); // depend on refetchKey to force re-evaluation\n const {clientID} = zero;\n const query = querySignal();\n const queryHash = query.hash();\n const ttl = normalize(options)?.ttl ?? DEFAULT_TTL_MS;\n if (\n !prevView ||\n clientID !== prevClientID ||\n prevRefetchKey !== currentRefetchKey ||\n (query !== prevQuery &&\n (clientID === undefined || query.hash() !== prevQueryHash))\n ) {\n if (prevView) {\n prevView.destroy();\n }\n view = zero.materialize(\n query,\n createSolidViewFactory(setState, refetch),\n {ttl},\n );\n } else {\n view = prevView;\n if (ttl !== prevTtl) {\n view.updateTTL(ttl);\n }\n }\n\n return [view, clientID, query, queryHash, ttl, currentRefetchKey];\n },\n [undefined, undefined, undefined, undefined, undefined, initialRefetchKey],\n );\n\n onCleanup(() => {\n view?.destroy();\n });\n\n return [() => state[0][''] as HumanReadable<TReturn>, () => state[1]];\n}\n\nfunction normalize<T>(\n options?: T | Accessor<T | undefined> | undefined,\n): T | undefined {\n return typeof options === 'function' ? (options as Accessor<T>)() : options;\n}\n", "import {produce, reconcile, type SetStoreFunction} from 'solid-js/store';\nimport {\n applyChange,\n type Change,\n type Entry,\n type Format,\n type Input,\n type Node,\n type Output,\n type Query,\n type Schema,\n type Stream,\n type TTL,\n type ViewChange,\n type ViewFactory,\n} from '../../zero-client/src/mod.js';\nimport {idSymbol} from '../../zql/src/ivm/view-apply-change.ts';\nimport type {ReadonlyJSONValue} from '../../shared/src/json.ts';\nimport type {ErroredQuery} from '../../zero-protocol/src/custom-queries.ts';\n\nexport type QueryResultDetails = Readonly<\n | {\n type: 'complete';\n }\n | {\n type: 'unknown';\n }\n | QueryErrorDetails\n>;\n\ntype QueryErrorDetails = {\n type: 'error';\n refetch: () => void;\n error:\n | {\n type: 'app';\n queryName: string;\n details: ReadonlyJSONValue;\n }\n | {\n type: 'http';\n queryName: string;\n status: number;\n details: ReadonlyJSONValue;\n };\n};\n\nexport type State = [Entry, QueryResultDetails];\n\nexport const COMPLETE: QueryResultDetails = Object.freeze({type: 'complete'});\nexport const UNKNOWN: QueryResultDetails = Object.freeze({type: 'unknown'});\n\nexport class SolidView implements Output {\n readonly #input: Input;\n readonly #format: Format;\n readonly #onDestroy: () => void;\n readonly #refetch: () => void;\n\n #setState: SetStoreFunction<State>;\n\n // Optimization: if the store is currently empty we build up\n // the view on a plain old JS object stored at #builderRoot, and return\n // that for the new state on transaction commit. This avoids building up\n // large views from scratch via solid produce. The proxy object used by\n // solid produce is slow and in this case we don't care about solid tracking\n // the fine grained changes (everything has changed, it's all new). For a\n // test case with a view with 3000 rows, each row having 2 children, this\n // optimization reduced #applyChanges time from 743ms to 133ms.\n #builderRoot: Entry | undefined;\n #pendingChanges: ViewChange[] = [];\n readonly #updateTTL: (ttl: TTL) => void;\n\n constructor(\n input: Input,\n onTransactionCommit: (cb: () => void) => void,\n format: Format,\n onDestroy: () => void,\n queryComplete: true | ErroredQuery | Promise<true>,\n updateTTL: (ttl: TTL) => void,\n setState: SetStoreFunction<State>,\n refetch: () => void,\n ) {\n this.#input = input;\n onTransactionCommit(this.#onTransactionCommit);\n this.#format = format;\n this.#onDestroy = onDestroy;\n this.#updateTTL = updateTTL;\n this.#refetch = refetch;\n\n input.setOutput(this);\n\n const initialRoot = this.#createEmptyRoot();\n this.#applyChangesToRoot(\n input.fetch({}),\n node => ({type: 'add', node}),\n initialRoot,\n );\n\n this.#setState = setState;\n this.#setState(\n reconcile(\n [\n initialRoot,\n queryComplete === true\n ? COMPLETE\n : 'error' in queryComplete\n ? this.#makeError(queryComplete)\n : UNKNOWN,\n ],\n {\n // solidjs's types want a string, but a symbol works\n key: idSymbol as unknown as string,\n },\n ),\n );\n\n if (isEmptyRoot(initialRoot)) {\n this.#builderRoot = this.#createEmptyRoot();\n }\n\n if (queryComplete !== true && !('error' in queryComplete)) {\n void queryComplete\n .then(() => {\n this.#setState(prev => [prev[0], COMPLETE]);\n })\n .catch((error: ErroredQuery) => {\n this.#setState(prev => [prev[0], this.#makeError(error)]);\n });\n }\n }\n\n #makeError(error: ErroredQuery): QueryErrorDetails {\n return {\n type: 'error',\n refetch: this.#refetch,\n error:\n error.error === 'app' || error.error === 'zero'\n ? {\n type: 'app',\n queryName: error.name,\n details: error.details,\n }\n : {\n type: 'http',\n queryName: error.name,\n status: error.status,\n details: error.details,\n },\n };\n }\n\n destroy(): void {\n this.#onDestroy();\n }\n\n #onTransactionCommit = () => {\n const builderRoot = this.#builderRoot;\n if (builderRoot) {\n if (!isEmptyRoot(builderRoot)) {\n this.#setState(\n 0,\n reconcile(builderRoot, {\n // solidjs's types want a string, but a symbol works\n key: idSymbol as unknown as string,\n }),\n );\n this.#setState(prev => [builderRoot, prev[1]]);\n this.#builderRoot = undefined;\n }\n } else {\n try {\n this.#applyChanges(this.#pendingChanges, c => c);\n } finally {\n this.#pendingChanges = [];\n }\n }\n };\n\n push(change: Change): void {\n // Delay updating the solid store state until the transaction commit\n // (because each update of the solid store is quite expensive). If\n // this.#builderRoot is defined apply the changes to it (we are building\n // from an empty root), otherwise queue the changes to be applied\n // using produce at the end of the transaction but read the relationships\n // now as they are only valid to read when the push is received.\n if (this.#builderRoot) {\n this.#applyChangeToRoot(change, this.#builderRoot);\n } else {\n this.#pendingChanges.push(materializeRelationships(change));\n }\n }\n\n #applyChanges<T>(changes: Iterable<T>, mapper: (v: T) => ViewChange): void {\n this.#setState(\n produce((draftState: State) => {\n this.#applyChangesToRoot<T>(changes, mapper, draftState[0]);\n if (isEmptyRoot(draftState[0])) {\n this.#builderRoot = this.#createEmptyRoot();\n }\n }),\n );\n }\n\n #applyChangesToRoot<T>(\n changes: Iterable<T>,\n mapper: (v: T) => ViewChange,\n root: Entry,\n ) {\n for (const change of changes) {\n this.#applyChangeToRoot(mapper(change), root);\n }\n }\n\n #applyChangeToRoot(change: ViewChange, root: Entry) {\n applyChange(\n root,\n change,\n this.#input.getSchema(),\n '',\n this.#format,\n true /* withIDs */,\n );\n }\n\n #createEmptyRoot(): Entry {\n return {\n '': this.#format.singular ? undefined : [],\n };\n }\n\n updateTTL(ttl: TTL): void {\n this.#updateTTL(ttl);\n }\n}\n\nfunction materializeRelationships(change: Change): ViewChange {\n switch (change.type) {\n case 'add':\n return {type: 'add', node: materializeNodeRelationships(change.node)};\n case 'remove':\n return {type: 'remove', node: materializeNodeRelationships(change.node)};\n case 'child':\n return {\n type: 'child',\n node: {row: change.node.row},\n child: {\n relationshipName: change.child.relationshipName,\n change: materializeRelationships(change.child.change),\n },\n };\n case 'edit':\n return {\n type: 'edit',\n node: {row: change.node.row},\n oldNode: {row: change.oldNode.row},\n };\n }\n}\n\nfunction materializeNodeRelationships(node: Node): Node {\n const relationships: Record<string, () => Stream<Node>> = {};\n for (const relationship in node.relationships) {\n const materialized: Node[] = [];\n for (const n of node.relationships[relationship]()) {\n materialized.push(materializeNodeRelationships(n));\n }\n relationships[relationship] = () => materialized;\n }\n return {\n row: node.row,\n relationships,\n };\n}\n\nfunction isEmptyRoot(entry: Entry) {\n const data = entry[''];\n return data === undefined || (Array.isArray(data) && data.length === 0);\n}\n\nexport function createSolidViewFactory(\n setState: SetStoreFunction<State>,\n refetch?: () => void,\n) {\n function solidViewFactory<\n TSchema extends Schema,\n TTable extends keyof TSchema['tables'] & string,\n TReturn,\n >(\n _query: Query<TSchema, TTable, TReturn>,\n input: Input,\n format: Format,\n onDestroy: () => void,\n onTransactionCommit: (cb: () => void) => void,\n queryComplete: true | ErroredQuery | Promise<true>,\n updateTTL: (ttl: TTL) => void,\n ) {\n return new SolidView(\n input,\n onTransactionCommit,\n format,\n onDestroy,\n queryComplete,\n updateTTL,\n setState,\n refetch || (() => {}),\n );\n }\n\n solidViewFactory satisfies ViewFactory<Schema, string, unknown, unknown>;\n\n return solidViewFactory;\n}\n", "import {\n batch,\n createContext,\n createMemo,\n onCleanup,\n splitProps,\n useContext,\n type Accessor,\n type JSX,\n} from 'solid-js';\nimport {\n Zero,\n type CustomMutatorDefs,\n type Schema,\n type ZeroOptions,\n} from '../../zero/src/zero.ts';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-explicit-any\nconst ZeroContext = createContext<Accessor<Zero<any, any>> | undefined>(\n undefined,\n);\n\nexport function createZero<S extends Schema, MD extends CustomMutatorDefs>(\n options: ZeroOptions<S, MD>,\n): Zero<S, MD> {\n const opts = {\n ...options,\n batchViewUpdates: batch,\n };\n return new Zero(opts);\n}\n\nexport function useZero<\n S extends Schema,\n MD extends CustomMutatorDefs | undefined = undefined,\n>(): () => Zero<S, MD> {\n const zero = useContext(ZeroContext);\n\n if (zero === undefined) {\n throw new Error('useZero must be used within a ZeroProvider');\n }\n return zero;\n}\n\nexport function createUseZero<\n S extends Schema,\n MD extends CustomMutatorDefs | undefined = undefined,\n>() {\n return () => useZero<S, MD>();\n}\n\nexport function ZeroProvider<\n S extends Schema,\n MD extends CustomMutatorDefs | undefined = undefined,\n>(\n props: {children: JSX.Element} & (\n | {\n zero: Zero<S, MD>;\n }\n | ZeroOptions<S, MD>\n ),\n) {\n const zero = createMemo(() => {\n if ('zero' in props) {\n return props.zero;\n }\n const [, options] = splitProps(props, ['children']);\n const createdZero = new Zero({\n ...options,\n batchViewUpdates: batch,\n });\n onCleanup(() => createdZero.close());\n return createdZero;\n });\n\n return ZeroContext.Provider({\n value: zero,\n get children() {\n return props.children;\n },\n });\n}\n", "import {createSignal, onCleanup, type Accessor} from 'solid-js';\nimport {useZero} from './use-zero.ts';\n\n/**\n * Tracks the online status of the current Zero instance.\n *\n * @returns An accessor \u2014 call `online()` to get a reactive `boolean`.\n *\n * @example\n * const online = useZeroOnline();\n *\n * <span>\n * {online() ? 'Online' : 'Offline'}\n * </span>\n */\nexport function useZeroOnline(): Accessor<boolean> {\n const zero = useZero()();\n\n const [online, setOnline] = createSignal<boolean>(zero.online);\n\n const unsubscribe = zero.onOnline(setOnline);\n\n onCleanup(unsubscribe);\n\n return online;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;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