@rocicorp/zero 0.24.2025101403 → 0.24.2025101700

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.
Files changed (123) hide show
  1. package/out/chunk-AFADJQ2O.js +1 -0
  2. package/out/chunk-AFADJQ2O.js.map +7 -0
  3. package/out/{chunk-5OBZ7D27.js → chunk-JYK4XJDC.js} +6 -3
  4. package/out/{chunk-5OBZ7D27.js.map → chunk-JYK4XJDC.js.map} +2 -2
  5. package/out/{chunk-ACPVJXLI.js → chunk-KSBP27P7.js} +2 -2
  6. package/out/chunk-ZZXMKAAG.js +64 -0
  7. package/out/chunk-ZZXMKAAG.js.map +7 -0
  8. package/out/expo-sqlite.js +11 -0
  9. package/out/expo-sqlite.js.map +7 -0
  10. package/out/op-sqlite.js +80 -0
  11. package/out/op-sqlite.js.map +7 -0
  12. package/out/react-native.js +14 -55
  13. package/out/react-native.js.map +4 -4
  14. package/out/react.js +4 -4
  15. package/out/replicache/src/expo-sqlite.d.ts +2 -0
  16. package/out/replicache/src/expo-sqlite.d.ts.map +1 -0
  17. package/out/replicache/src/kv/op-sqlite/store.d.ts +14 -0
  18. package/out/replicache/src/kv/op-sqlite/store.d.ts.map +1 -0
  19. package/out/replicache/src/kv/op-sqlite/types.d.ts +13 -0
  20. package/out/replicache/src/kv/op-sqlite/types.d.ts.map +1 -0
  21. package/out/replicache/src/op-sqlite.d.ts +2 -0
  22. package/out/replicache/src/op-sqlite.d.ts.map +1 -0
  23. package/out/solid.js +2 -2
  24. package/out/sqlite.js +1 -0
  25. package/out/zero/package.json +51 -29
  26. package/out/zero/src/expo-sqlite.d.ts +2 -0
  27. package/out/zero/src/expo-sqlite.d.ts.map +1 -0
  28. package/out/zero/src/op-sqlite.d.ts +2 -0
  29. package/out/zero/src/op-sqlite.d.ts.map +1 -0
  30. package/out/zero/src/react-native.d.ts +30 -1
  31. package/out/zero/src/react-native.d.ts.map +1 -1
  32. package/out/zero-cache/src/config/zero-config.d.ts.map +1 -1
  33. package/out/zero-cache/src/config/zero-config.js +37 -4
  34. package/out/zero-cache/src/config/zero-config.js.map +1 -1
  35. package/out/zero-cache/src/custom/fetch.d.ts +23 -11
  36. package/out/zero-cache/src/custom/fetch.d.ts.map +1 -1
  37. package/out/zero-cache/src/custom/fetch.js +34 -48
  38. package/out/zero-cache/src/custom/fetch.js.map +1 -1
  39. package/out/zero-cache/src/custom-queries/transform-query.d.ts.map +1 -1
  40. package/out/zero-cache/src/custom-queries/transform-query.js +4 -2
  41. package/out/zero-cache/src/custom-queries/transform-query.js.map +1 -1
  42. package/out/zero-cache/src/db/migration.d.ts +1 -1
  43. package/out/zero-cache/src/db/migration.d.ts.map +1 -1
  44. package/out/zero-cache/src/db/migration.js +2 -0
  45. package/out/zero-cache/src/db/migration.js.map +1 -1
  46. package/out/zero-cache/src/db/pg-to-lite.js +1 -1
  47. package/out/zero-cache/src/db/pg-to-lite.js.map +1 -1
  48. package/out/zero-cache/src/db/transaction-pool.d.ts +1 -1
  49. package/out/zero-cache/src/db/transaction-pool.d.ts.map +1 -1
  50. package/out/zero-cache/src/db/transaction-pool.js +3 -1
  51. package/out/zero-cache/src/db/transaction-pool.js.map +1 -1
  52. package/out/zero-cache/src/services/change-source/pg/change-source.js.map +1 -1
  53. package/out/zero-cache/src/services/change-source/pg/schema/validation.js +1 -1
  54. package/out/zero-cache/src/services/change-source/pg/schema/validation.js.map +1 -1
  55. package/out/zero-cache/src/services/change-streamer/schema/tables.d.ts +1 -1
  56. package/out/zero-cache/src/services/change-streamer/schema/tables.d.ts.map +1 -1
  57. package/out/zero-cache/src/services/change-streamer/schema/tables.js +2 -0
  58. package/out/zero-cache/src/services/change-streamer/schema/tables.js.map +1 -1
  59. package/out/zero-cache/src/services/change-streamer/storer.d.ts +1 -1
  60. package/out/zero-cache/src/services/change-streamer/storer.d.ts.map +1 -1
  61. package/out/zero-cache/src/services/change-streamer/storer.js +2 -0
  62. package/out/zero-cache/src/services/change-streamer/storer.js.map +1 -1
  63. package/out/zero-cache/src/services/mutagen/pusher.d.ts.map +1 -1
  64. package/out/zero-cache/src/services/mutagen/pusher.js +5 -3
  65. package/out/zero-cache/src/services/mutagen/pusher.js.map +1 -1
  66. package/out/zero-cache/src/services/replicator/schema/constants.d.ts +7 -0
  67. package/out/zero-cache/src/services/replicator/schema/constants.d.ts.map +1 -0
  68. package/out/zero-cache/src/services/replicator/schema/constants.js +7 -0
  69. package/out/zero-cache/src/services/replicator/schema/constants.js.map +1 -0
  70. package/out/zero-cache/src/services/replicator/schema/replication-state.d.ts +2 -2
  71. package/out/zero-cache/src/services/replicator/schema/replication-state.d.ts.map +1 -1
  72. package/out/zero-cache/src/services/replicator/schema/replication-state.js +2 -1
  73. package/out/zero-cache/src/services/replicator/schema/replication-state.js.map +1 -1
  74. package/out/zero-cache/src/services/view-syncer/client-schema.js +1 -1
  75. package/out/zero-cache/src/services/view-syncer/client-schema.js.map +1 -1
  76. package/out/zero-cache/src/services/view-syncer/cvr-purger.d.ts +1 -1
  77. package/out/zero-cache/src/services/view-syncer/cvr-purger.d.ts.map +1 -1
  78. package/out/zero-cache/src/services/view-syncer/cvr-purger.js +2 -0
  79. package/out/zero-cache/src/services/view-syncer/cvr-purger.js.map +1 -1
  80. package/out/zero-cache/src/services/view-syncer/row-record-cache.d.ts +1 -1
  81. package/out/zero-cache/src/services/view-syncer/row-record-cache.d.ts.map +1 -1
  82. package/out/zero-cache/src/services/view-syncer/row-record-cache.js +2 -0
  83. package/out/zero-cache/src/services/view-syncer/row-record-cache.js.map +1 -1
  84. package/out/zero-cache/src/types/pg.d.ts +12 -0
  85. package/out/zero-cache/src/types/pg.d.ts.map +1 -1
  86. package/out/zero-cache/src/types/pg.js +15 -26
  87. package/out/zero-cache/src/types/pg.js.map +1 -1
  88. package/out/zero-events/src/index.d.ts +2 -2
  89. package/out/zero-events/src/index.d.ts.map +1 -1
  90. package/out/zero-events/src/{util.d.ts → json.d.ts} +1 -7
  91. package/out/zero-events/src/json.d.ts.map +1 -0
  92. package/out/zero-events/src/json.js +2 -0
  93. package/out/zero-events/src/json.js.map +1 -0
  94. package/out/zero-events/src/status.d.ts +7 -7
  95. package/out/zero-events/src/status.d.ts.map +1 -1
  96. package/out/zero-events/src/status.js.map +1 -1
  97. package/out/zero-server/src/adapters/drizzle.d.ts +4 -8
  98. package/out/zero-server/src/adapters/drizzle.d.ts.map +1 -1
  99. package/out/zero-server/src/adapters/drizzle.js.map +1 -1
  100. package/out/zero.js +2 -2
  101. package/out/zql/src/ivm/constraint.d.ts +1 -0
  102. package/out/zql/src/ivm/constraint.d.ts.map +1 -1
  103. package/out/zql/src/ivm/constraint.js +4 -1
  104. package/out/zql/src/ivm/constraint.js.map +1 -1
  105. package/out/zqlite/src/db.d.ts +1 -0
  106. package/out/zqlite/src/db.d.ts.map +1 -1
  107. package/out/zqlite/src/db.js +2 -0
  108. package/out/zqlite/src/db.js.map +1 -1
  109. package/out/zqlite/src/query-builder.d.ts +22 -0
  110. package/out/zqlite/src/query-builder.d.ts.map +1 -0
  111. package/out/zqlite/src/query-builder.js +162 -0
  112. package/out/zqlite/src/query-builder.js.map +1 -0
  113. package/out/zqlite/src/table-source.d.ts +0 -13
  114. package/out/zqlite/src/table-source.d.ts.map +1 -1
  115. package/out/zqlite/src/table-source.js +2 -158
  116. package/out/zqlite/src/table-source.js.map +1 -1
  117. package/package.json +51 -29
  118. package/out/zero-events/src/util.d.ts.map +0 -1
  119. package/out/zero-events/src/util.js +0 -2
  120. package/out/zero-events/src/util.js.map +0 -1
  121. package/out/zero-react-native/src/mod.d.ts +0 -2
  122. package/out/zero-react-native/src/mod.d.ts.map +0 -1
  123. /package/out/{chunk-ACPVJXLI.js.map → chunk-KSBP27P7.js.map} +0 -0
@@ -5,7 +5,7 @@ import {
5
5
  defaultFormat,
6
6
  newQuery,
7
7
  newQuerySymbol
8
- } from "./chunk-5OBZ7D27.js";
8
+ } from "./chunk-JYK4XJDC.js";
9
9
  import {
10
10
  mapCondition,
11
11
  toStaticParam
@@ -353,4 +353,4 @@ export {
353
353
  withValidation,
354
354
  createBuilder
355
355
  };
356
- //# sourceMappingURL=chunk-ACPVJXLI.js.map
356
+ //# sourceMappingURL=chunk-KSBP27P7.js.map
@@ -0,0 +1,64 @@
1
+ import {
2
+ SQLiteStore,
3
+ dropStore
4
+ } from "./chunk-ECUMGQGC.js";
5
+
6
+ // ../replicache/src/kv/expo-sqlite/store.ts
7
+ import {
8
+ deleteDatabaseSync,
9
+ openDatabaseSync
10
+ } from "expo-sqlite";
11
+ function dropExpoSQLiteStore(name) {
12
+ return dropStore(name, (filename) => new ExpoSQLiteDatabase(filename));
13
+ }
14
+ function expoSQLiteStoreProvider(opts) {
15
+ return {
16
+ create: (name) => new SQLiteStore(name, (name2) => new ExpoSQLiteDatabase(name2), opts),
17
+ drop: dropExpoSQLiteStore
18
+ };
19
+ }
20
+ var ExpoSQLitePreparedStatement = class {
21
+ #statement;
22
+ constructor(statement) {
23
+ this.#statement = statement;
24
+ }
25
+ async firstValue(params) {
26
+ const result = await this.#statement.executeForRawResultAsync(params);
27
+ const row = await result.getFirstAsync();
28
+ return row === null ? void 0 : row[0];
29
+ }
30
+ async exec(params) {
31
+ await this.#statement.executeForRawResultAsync(params);
32
+ }
33
+ };
34
+ var ExpoSQLiteDatabase = class {
35
+ #db;
36
+ #filename;
37
+ #statements = /* @__PURE__ */ new Set();
38
+ constructor(filename) {
39
+ this.#filename = filename;
40
+ this.#db = openDatabaseSync(filename);
41
+ }
42
+ close() {
43
+ for (const stmt of this.#statements) {
44
+ stmt.finalizeSync();
45
+ }
46
+ this.#db.closeSync();
47
+ }
48
+ destroy() {
49
+ deleteDatabaseSync(this.#filename);
50
+ }
51
+ prepare(sql) {
52
+ const statement = this.#db.prepareSync(sql);
53
+ this.#statements.add(statement);
54
+ return new ExpoSQLitePreparedStatement(statement);
55
+ }
56
+ execSync(sql) {
57
+ this.#db.execSync(sql);
58
+ }
59
+ };
60
+
61
+ export {
62
+ expoSQLiteStoreProvider
63
+ };
64
+ //# sourceMappingURL=chunk-ZZXMKAAG.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../replicache/src/kv/expo-sqlite/store.ts"],
4
+ "sourcesContent": ["import {\n deleteDatabaseSync,\n openDatabaseSync,\n type SQLiteDatabase as DB,\n type SQLiteStatement,\n} from 'expo-sqlite';\nimport type {\n PreparedStatement,\n SQLiteDatabase,\n SQLiteStoreOptions,\n} from '../sqlite-store.ts';\nimport {dropStore, SQLiteStore} from '../sqlite-store.ts';\nimport type {StoreProvider} from '../store.ts';\n\nexport type ExpoSQLiteStoreOptions = SQLiteStoreOptions;\n\nexport function dropExpoSQLiteStore(name: string): Promise<void> {\n return dropStore(name, filename => new ExpoSQLiteDatabase(filename));\n}\n\n/**\n * Creates a StoreProvider for SQLite-based stores using expo-sqlite.\n * Supports shared connections between multiple store instances with the same name,\n * providing efficient resource utilization and proper transaction isolation.\n */\nexport function expoSQLiteStoreProvider(\n opts?: ExpoSQLiteStoreOptions,\n): StoreProvider {\n return {\n create: name =>\n new SQLiteStore(name, name => new ExpoSQLiteDatabase(name), opts),\n drop: dropExpoSQLiteStore,\n };\n}\n\nclass ExpoSQLitePreparedStatement implements PreparedStatement {\n readonly #statement: SQLiteStatement;\n\n constructor(statement: SQLiteStatement) {\n this.#statement = statement;\n }\n\n async firstValue(params: string[]): Promise<string | undefined> {\n const result = await this.#statement.executeForRawResultAsync(params);\n const row = await result.getFirstAsync();\n return row === null ? undefined : row[0];\n }\n\n async exec(params: string[]): Promise<void> {\n await this.#statement.executeForRawResultAsync(params);\n }\n}\n\nclass ExpoSQLiteDatabase implements SQLiteDatabase {\n readonly #db: DB;\n readonly #filename: string;\n readonly #statements: Set<SQLiteStatement> = new Set();\n\n constructor(filename: string) {\n this.#filename = filename;\n this.#db = openDatabaseSync(filename);\n }\n\n close(): void {\n for (const stmt of this.#statements) {\n stmt.finalizeSync();\n }\n this.#db.closeSync();\n }\n\n destroy(): void {\n deleteDatabaseSync(this.#filename);\n }\n\n prepare(sql: string): PreparedStatement {\n const statement = this.#db.prepareSync(sql);\n this.#statements.add(statement);\n return new ExpoSQLitePreparedStatement(statement);\n }\n\n execSync(sql: string): void {\n this.#db.execSync(sql);\n }\n}\n"],
5
+ "mappings": ";;;;;;AAAA;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AAWA,SAAS,oBAAoB,MAA6B;AAC/D,SAAO,UAAU,MAAM,cAAY,IAAI,mBAAmB,QAAQ,CAAC;AACrE;AAOO,SAAS,wBACd,MACe;AACf,SAAO;AAAA,IACL,QAAQ,UACN,IAAI,YAAY,MAAM,CAAAA,UAAQ,IAAI,mBAAmBA,KAAI,GAAG,IAAI;AAAA,IAClE,MAAM;AAAA,EACR;AACF;AAEA,IAAM,8BAAN,MAA+D;AAAA,EACpD;AAAA,EAET,YAAY,WAA4B;AACtC,SAAK,aAAa;AAAA,EACpB;AAAA,EAEA,MAAM,WAAW,QAA+C;AAC9D,UAAM,SAAS,MAAM,KAAK,WAAW,yBAAyB,MAAM;AACpE,UAAM,MAAM,MAAM,OAAO,cAAc;AACvC,WAAO,QAAQ,OAAO,SAAY,IAAI,CAAC;AAAA,EACzC;AAAA,EAEA,MAAM,KAAK,QAAiC;AAC1C,UAAM,KAAK,WAAW,yBAAyB,MAAM;AAAA,EACvD;AACF;AAEA,IAAM,qBAAN,MAAmD;AAAA,EACxC;AAAA,EACA;AAAA,EACA,cAAoC,oBAAI,IAAI;AAAA,EAErD,YAAY,UAAkB;AAC5B,SAAK,YAAY;AACjB,SAAK,MAAM,iBAAiB,QAAQ;AAAA,EACtC;AAAA,EAEA,QAAc;AACZ,eAAW,QAAQ,KAAK,aAAa;AACnC,WAAK,aAAa;AAAA,IACpB;AACA,SAAK,IAAI,UAAU;AAAA,EACrB;AAAA,EAEA,UAAgB;AACd,uBAAmB,KAAK,SAAS;AAAA,EACnC;AAAA,EAEA,QAAQ,KAAgC;AACtC,UAAM,YAAY,KAAK,IAAI,YAAY,GAAG;AAC1C,SAAK,YAAY,IAAI,SAAS;AAC9B,WAAO,IAAI,4BAA4B,SAAS;AAAA,EAClD;AAAA,EAEA,SAAS,KAAmB;AAC1B,SAAK,IAAI,SAAS,GAAG;AAAA,EACvB;AACF;",
6
+ "names": ["name"]
7
+ }
@@ -0,0 +1,11 @@
1
+ import {
2
+ expoSQLiteStoreProvider
3
+ } from "./chunk-ZZXMKAAG.js";
4
+ import "./chunk-ECUMGQGC.js";
5
+ import "./chunk-ASRS2LFV.js";
6
+ import "./chunk-EZM3XBAB.js";
7
+ import "./chunk-424PT5DM.js";
8
+ export {
9
+ expoSQLiteStoreProvider
10
+ };
11
+ //# sourceMappingURL=expo-sqlite.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,80 @@
1
+ import {
2
+ SQLiteStore,
3
+ dropStore
4
+ } from "./chunk-ECUMGQGC.js";
5
+ import "./chunk-ASRS2LFV.js";
6
+ import "./chunk-EZM3XBAB.js";
7
+ import "./chunk-424PT5DM.js";
8
+
9
+ // ../replicache/src/kv/op-sqlite/types.ts
10
+ import { open as openDB } from "@op-engineering/op-sqlite";
11
+ var open = openDB;
12
+
13
+ // ../replicache/src/kv/op-sqlite/store.ts
14
+ function dropOpSQLiteStore(name) {
15
+ return dropStore(
16
+ name,
17
+ (filename, opts) => new OpSQLiteDatabase(filename, opts)
18
+ );
19
+ }
20
+ function opSQLiteStoreProvider(opts) {
21
+ return {
22
+ create: (name) => new SQLiteStore(
23
+ name,
24
+ (name2, options) => new OpSQLiteDatabase(name2, options),
25
+ opts
26
+ ),
27
+ drop: dropOpSQLiteStore
28
+ };
29
+ }
30
+ var OpSQLitePreparedStatement = class {
31
+ #db;
32
+ #sql;
33
+ constructor(db, sql) {
34
+ this.#db = db;
35
+ this.#sql = sql;
36
+ }
37
+ async firstValue(params) {
38
+ const rows = await this.#db.executeRaw(this.#sql, params);
39
+ return rows[0]?.[0];
40
+ }
41
+ async exec(params) {
42
+ await this.#db.executeRaw(this.#sql, params);
43
+ }
44
+ };
45
+ var OpSQLiteDatabase = class {
46
+ #db;
47
+ #filename;
48
+ constructor(filename, opts) {
49
+ this.#filename = filename;
50
+ const openOpts = { name: filename };
51
+ if (opts?.location) {
52
+ openOpts.location = opts.location;
53
+ }
54
+ if (opts?.encryptionKey) {
55
+ openOpts.encryptionKey = opts.encryptionKey;
56
+ }
57
+ this.#db = open(openOpts);
58
+ }
59
+ close() {
60
+ this.#db.close();
61
+ }
62
+ destroy() {
63
+ try {
64
+ const tempDb = open({ name: this.#filename });
65
+ tempDb.delete();
66
+ tempDb.close();
67
+ } catch (_error) {
68
+ }
69
+ }
70
+ prepare(sql) {
71
+ return new OpSQLitePreparedStatement(this.#db, sql);
72
+ }
73
+ execSync(sql) {
74
+ this.#db.executeRawSync(sql, []);
75
+ }
76
+ };
77
+ export {
78
+ opSQLiteStoreProvider
79
+ };
80
+ //# sourceMappingURL=op-sqlite.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../replicache/src/kv/op-sqlite/types.ts", "../../replicache/src/kv/op-sqlite/store.ts"],
4
+ "sourcesContent": ["// Type definitions and imports for @op-engineering/op-sqlite\n// This file isolates the module resolution workarounds needed for this package\n\n// @ts-expect-error - Module resolution issue with @op-engineering/op-sqlite exports\nimport {open as openDB} from '@op-engineering/op-sqlite';\n\n// Minimal type definitions for @op-engineering/op-sqlite\n// These types are used as fallback since imports have module resolution issues\nexport interface DB {\n close: () => void;\n delete: (location?: string) => void;\n executeRaw: (query: string, params?: string[]) => Promise<string[][]>;\n executeRawSync: (query: string, params?: string[]) => string[][];\n}\n\nexport type OpenFunction = (params: {\n name: string;\n location?: string;\n encryptionKey?: string;\n}) => DB;\n\n// Export the open function with proper typing\nexport const open: OpenFunction = openDB;\n", "import type {\n PreparedStatement,\n SQLiteDatabase,\n SQLiteStoreOptions,\n} from '../sqlite-store.ts';\nimport {dropStore, SQLiteStore} from '../sqlite-store.ts';\nimport type {StoreProvider} from '../store.ts';\nimport {open, type DB} from './types.ts';\n\nexport type OpSQLiteStoreOptions = SQLiteStoreOptions & {\n // OpSQLite-specific options\n location?: 'default' | 'Library' | 'Documents' | 'Temporary';\n encryptionKey?: string;\n};\n\nfunction dropOpSQLiteStore(name: string): Promise<void> {\n return dropStore(\n name,\n (filename, opts) => new OpSQLiteDatabase(filename, opts),\n );\n}\n\n/**\n * Creates a StoreProvider for SQLite-based stores using @op-engineering/op-sqlite.\n * Supports shared connections between multiple store instances with the same name,\n * providing efficient resource utilization and proper transaction isolation.\n * Uses parameterized queries for safety and performance.\n */\nexport function opSQLiteStoreProvider(\n opts?: OpSQLiteStoreOptions,\n): StoreProvider {\n return {\n create: name =>\n new SQLiteStore(\n name,\n (name, options) => new OpSQLiteDatabase(name, options),\n opts,\n ),\n drop: dropOpSQLiteStore,\n };\n}\n\nclass OpSQLitePreparedStatement implements PreparedStatement {\n readonly #db: DB;\n readonly #sql: string;\n\n constructor(db: DB, sql: string) {\n this.#db = db;\n this.#sql = sql;\n }\n\n async firstValue(params: string[]): Promise<string | undefined> {\n const rows = await this.#db.executeRaw(this.#sql, params);\n return rows[0]?.[0];\n }\n\n async exec(params: string[]): Promise<void> {\n await this.#db.executeRaw(this.#sql, params);\n }\n}\n\nclass OpSQLiteDatabase implements SQLiteDatabase {\n readonly #db: DB;\n readonly #filename: string;\n\n constructor(filename: string, opts?: OpSQLiteStoreOptions) {\n this.#filename = filename;\n const openOpts: {\n name: string;\n location?: string;\n encryptionKey?: string;\n } = {name: filename};\n\n if (opts?.location) {\n openOpts.location = opts.location;\n }\n if (opts?.encryptionKey) {\n openOpts.encryptionKey = opts.encryptionKey;\n }\n\n this.#db = open(openOpts);\n }\n\n close(): void {\n this.#db.close();\n }\n\n destroy(): void {\n // OpSQLite uses delete method on the database instance\n // We need to create a temporary connection to delete the database\n try {\n const tempDb = open({name: this.#filename});\n tempDb.delete();\n tempDb.close();\n } catch (_error) {\n // Database might not exist, which is fine\n }\n }\n\n prepare(sql: string): PreparedStatement {\n return new OpSQLitePreparedStatement(this.#db, sql);\n }\n\n execSync(sql: string): void {\n this.#db.executeRawSync(sql, []);\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;AAIA,SAAQ,QAAQ,cAAa;AAkBtB,IAAM,OAAqB;;;ACPlC,SAAS,kBAAkB,MAA6B;AACtD,SAAO;AAAA,IACL;AAAA,IACA,CAAC,UAAU,SAAS,IAAI,iBAAiB,UAAU,IAAI;AAAA,EACzD;AACF;AAQO,SAAS,sBACd,MACe;AACf,SAAO;AAAA,IACL,QAAQ,UACN,IAAI;AAAA,MACF;AAAA,MACA,CAACA,OAAM,YAAY,IAAI,iBAAiBA,OAAM,OAAO;AAAA,MACrD;AAAA,IACF;AAAA,IACF,MAAM;AAAA,EACR;AACF;AAEA,IAAM,4BAAN,MAA6D;AAAA,EAClD;AAAA,EACA;AAAA,EAET,YAAY,IAAQ,KAAa;AAC/B,SAAK,MAAM;AACX,SAAK,OAAO;AAAA,EACd;AAAA,EAEA,MAAM,WAAW,QAA+C;AAC9D,UAAM,OAAO,MAAM,KAAK,IAAI,WAAW,KAAK,MAAM,MAAM;AACxD,WAAO,KAAK,CAAC,IAAI,CAAC;AAAA,EACpB;AAAA,EAEA,MAAM,KAAK,QAAiC;AAC1C,UAAM,KAAK,IAAI,WAAW,KAAK,MAAM,MAAM;AAAA,EAC7C;AACF;AAEA,IAAM,mBAAN,MAAiD;AAAA,EACtC;AAAA,EACA;AAAA,EAET,YAAY,UAAkB,MAA6B;AACzD,SAAK,YAAY;AACjB,UAAM,WAIF,EAAC,MAAM,SAAQ;AAEnB,QAAI,MAAM,UAAU;AAClB,eAAS,WAAW,KAAK;AAAA,IAC3B;AACA,QAAI,MAAM,eAAe;AACvB,eAAS,gBAAgB,KAAK;AAAA,IAChC;AAEA,SAAK,MAAM,KAAK,QAAQ;AAAA,EAC1B;AAAA,EAEA,QAAc;AACZ,SAAK,IAAI,MAAM;AAAA,EACjB;AAAA,EAEA,UAAgB;AAGd,QAAI;AACF,YAAM,SAAS,KAAK,EAAC,MAAM,KAAK,UAAS,CAAC;AAC1C,aAAO,OAAO;AACd,aAAO,MAAM;AAAA,IACf,SAAS,QAAQ;AAAA,IAEjB;AAAA,EACF;AAAA,EAEA,QAAQ,KAAgC;AACtC,WAAO,IAAI,0BAA0B,KAAK,KAAK,GAAG;AAAA,EACpD;AAAA,EAEA,SAAS,KAAmB;AAC1B,SAAK,IAAI,eAAe,KAAK,CAAC,CAAC;AAAA,EACjC;AACF;",
6
+ "names": ["name"]
7
+ }
@@ -1,66 +1,25 @@
1
+ import "./chunk-AFADJQ2O.js";
2
+ import {
3
+ expoSQLiteStoreProvider
4
+ } from "./chunk-ZZXMKAAG.js";
1
5
  import {
2
6
  SQLiteStore,
7
+ clearAllNamedStoresForTesting,
3
8
  dropStore
4
9
  } from "./chunk-ECUMGQGC.js";
5
10
  import "./chunk-ASRS2LFV.js";
6
11
  import "./chunk-EZM3XBAB.js";
7
12
  import "./chunk-424PT5DM.js";
8
13
 
9
- // ../replicache/src/kv/expo-sqlite/store.ts
10
- import {
11
- deleteDatabaseSync,
12
- openDatabaseSync
13
- } from "expo-sqlite";
14
- function dropExpoSQLiteStore(name) {
15
- return dropStore(name, (filename) => new ExpoSQLiteDatabase(filename));
16
- }
17
- function expoSQLiteStoreProvider(opts) {
18
- return {
19
- create: (name) => new SQLiteStore(name, (name2) => new ExpoSQLiteDatabase(name2), opts),
20
- drop: dropExpoSQLiteStore
21
- };
22
- }
23
- var ExpoSQLitePreparedStatement = class {
24
- #statement;
25
- constructor(statement) {
26
- this.#statement = statement;
27
- }
28
- async firstValue(params) {
29
- const result = await this.#statement.executeForRawResultAsync(params);
30
- const row = await result.getFirstAsync();
31
- return row === null ? void 0 : row[0];
32
- }
33
- async exec(params) {
34
- await this.#statement.executeForRawResultAsync(params);
35
- }
36
- };
37
- var ExpoSQLiteDatabase = class {
38
- #db;
39
- #filename;
40
- #statements = /* @__PURE__ */ new Set();
41
- constructor(filename) {
42
- this.#filename = filename;
43
- this.#db = openDatabaseSync(filename);
44
- }
45
- close() {
46
- for (const stmt of this.#statements) {
47
- stmt.finalizeSync();
48
- }
49
- this.#db.closeSync();
50
- }
51
- destroy() {
52
- deleteDatabaseSync(this.#filename);
53
- }
54
- prepare(sql) {
55
- const statement = this.#db.prepareSync(sql);
56
- this.#statements.add(statement);
57
- return new ExpoSQLitePreparedStatement(statement);
58
- }
59
- execSync(sql) {
60
- this.#db.execSync(sql);
61
- }
62
- };
14
+ // src/react-native.ts
15
+ var expoSQLiteStoreProvider2 = expoSQLiteStoreProvider;
16
+ var clearAllNamedStoresForTesting2 = clearAllNamedStoresForTesting;
17
+ var dropStore2 = dropStore;
18
+ var SQLiteStore2 = SQLiteStore;
63
19
  export {
64
- expoSQLiteStoreProvider
20
+ SQLiteStore2 as SQLiteStore,
21
+ clearAllNamedStoresForTesting2 as clearAllNamedStoresForTesting,
22
+ dropStore2 as dropStore,
23
+ expoSQLiteStoreProvider2 as expoSQLiteStoreProvider
65
24
  };
66
25
  //# sourceMappingURL=react-native.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../replicache/src/kv/expo-sqlite/store.ts"],
4
- "sourcesContent": ["import {\n deleteDatabaseSync,\n openDatabaseSync,\n type SQLiteDatabase as DB,\n type SQLiteStatement,\n} from 'expo-sqlite';\nimport type {\n PreparedStatement,\n SQLiteDatabase,\n SQLiteStoreOptions,\n} from '../sqlite-store.ts';\nimport {dropStore, SQLiteStore} from '../sqlite-store.ts';\nimport type {StoreProvider} from '../store.ts';\n\nexport type ExpoSQLiteStoreOptions = SQLiteStoreOptions;\n\nexport function dropExpoSQLiteStore(name: string): Promise<void> {\n return dropStore(name, filename => new ExpoSQLiteDatabase(filename));\n}\n\n/**\n * Creates a StoreProvider for SQLite-based stores using expo-sqlite.\n * Supports shared connections between multiple store instances with the same name,\n * providing efficient resource utilization and proper transaction isolation.\n */\nexport function expoSQLiteStoreProvider(\n opts?: ExpoSQLiteStoreOptions,\n): StoreProvider {\n return {\n create: name =>\n new SQLiteStore(name, name => new ExpoSQLiteDatabase(name), opts),\n drop: dropExpoSQLiteStore,\n };\n}\n\nclass ExpoSQLitePreparedStatement implements PreparedStatement {\n readonly #statement: SQLiteStatement;\n\n constructor(statement: SQLiteStatement) {\n this.#statement = statement;\n }\n\n async firstValue(params: string[]): Promise<string | undefined> {\n const result = await this.#statement.executeForRawResultAsync(params);\n const row = await result.getFirstAsync();\n return row === null ? undefined : row[0];\n }\n\n async exec(params: string[]): Promise<void> {\n await this.#statement.executeForRawResultAsync(params);\n }\n}\n\nclass ExpoSQLiteDatabase implements SQLiteDatabase {\n readonly #db: DB;\n readonly #filename: string;\n readonly #statements: Set<SQLiteStatement> = new Set();\n\n constructor(filename: string) {\n this.#filename = filename;\n this.#db = openDatabaseSync(filename);\n }\n\n close(): void {\n for (const stmt of this.#statements) {\n stmt.finalizeSync();\n }\n this.#db.closeSync();\n }\n\n destroy(): void {\n deleteDatabaseSync(this.#filename);\n }\n\n prepare(sql: string): PreparedStatement {\n const statement = this.#db.prepareSync(sql);\n this.#statements.add(statement);\n return new ExpoSQLitePreparedStatement(statement);\n }\n\n execSync(sql: string): void {\n this.#db.execSync(sql);\n }\n}\n"],
5
- "mappings": ";;;;;;;;;AAAA;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AAWA,SAAS,oBAAoB,MAA6B;AAC/D,SAAO,UAAU,MAAM,cAAY,IAAI,mBAAmB,QAAQ,CAAC;AACrE;AAOO,SAAS,wBACd,MACe;AACf,SAAO;AAAA,IACL,QAAQ,UACN,IAAI,YAAY,MAAM,CAAAA,UAAQ,IAAI,mBAAmBA,KAAI,GAAG,IAAI;AAAA,IAClE,MAAM;AAAA,EACR;AACF;AAEA,IAAM,8BAAN,MAA+D;AAAA,EACpD;AAAA,EAET,YAAY,WAA4B;AACtC,SAAK,aAAa;AAAA,EACpB;AAAA,EAEA,MAAM,WAAW,QAA+C;AAC9D,UAAM,SAAS,MAAM,KAAK,WAAW,yBAAyB,MAAM;AACpE,UAAM,MAAM,MAAM,OAAO,cAAc;AACvC,WAAO,QAAQ,OAAO,SAAY,IAAI,CAAC;AAAA,EACzC;AAAA,EAEA,MAAM,KAAK,QAAiC;AAC1C,UAAM,KAAK,WAAW,yBAAyB,MAAM;AAAA,EACvD;AACF;AAEA,IAAM,qBAAN,MAAmD;AAAA,EACxC;AAAA,EACA;AAAA,EACA,cAAoC,oBAAI,IAAI;AAAA,EAErD,YAAY,UAAkB;AAC5B,SAAK,YAAY;AACjB,SAAK,MAAM,iBAAiB,QAAQ;AAAA,EACtC;AAAA,EAEA,QAAc;AACZ,eAAW,QAAQ,KAAK,aAAa;AACnC,WAAK,aAAa;AAAA,IACpB;AACA,SAAK,IAAI,UAAU;AAAA,EACrB;AAAA,EAEA,UAAgB;AACd,uBAAmB,KAAK,SAAS;AAAA,EACnC;AAAA,EAEA,QAAQ,KAAgC;AACtC,UAAM,YAAY,KAAK,IAAI,YAAY,GAAG;AAC1C,SAAK,YAAY,IAAI,SAAS;AAC9B,WAAO,IAAI,4BAA4B,SAAS;AAAA,EAClD;AAAA,EAEA,SAAS,KAAmB;AAC1B,SAAK,IAAI,SAAS,GAAG;AAAA,EACvB;AACF;",
6
- "names": ["name"]
3
+ "sources": ["../src/react-native.ts"],
4
+ "sourcesContent": ["import * as expo from './expo-sqlite.ts';\nimport * as sqlite from './sqlite.ts';\n\n// We reassign these so that we can mark them deprecated in the docs/IDEs.\n\n/** @deprecated Use `expoSQLiteStoreProvider` from `@rocicorp/zero/expo-sqlite` instead. */\nexport const expoSQLiteStoreProvider = expo.expoSQLiteStoreProvider;\n\n/** @deprecated Use `clearAllNamedStoresForTesting` from `@rocicorp/zero/expo-sqlite` instead. */\nexport const clearAllNamedStoresForTesting =\n sqlite.clearAllNamedStoresForTesting;\n\n/** @deprecated Use `dropStore` from `@rocicorp/zero/expo-sqlite` instead. */\nexport const dropStore = sqlite.dropStore;\n\n/** @deprecated Use `SQLiteStore` from `@rocicorp/zero/expo-sqlite` instead. */\nexport const SQLiteStore = sqlite.SQLiteStore;\n\n/** @deprecated Use `ExpoSQLiteStoreOptions` from `@rocicorp/zero/expo-sqlite` instead. */\nexport type ExpoSQLiteStoreOptions = expo.ExpoSQLiteStoreOptions;\n\n/** @deprecated Use `PreparedStatement` from `@rocicorp/zero/expo-sqlite` instead. */\nexport type PreparedStatement = sqlite.PreparedStatement;\n\n/** @deprecated Use `SQLiteDatabase` from `@rocicorp/zero/expo-sqlite` instead. */\nexport type SQLiteDatabase = sqlite.SQLiteDatabase;\n\n/** @deprecated Use `SQLiteStoreOptions` from `@rocicorp/zero/expo-sqlite` instead. */\nexport type SQLiteStoreOptions = sqlite.SQLiteStoreOptions;\n\n/** @deprecated Use `CreateStore` from `@rocicorp/zero/expo-sqlite` instead. */\nexport type CreateStore = sqlite.CreateStore;\n\n/** @deprecated Use `DropStore` from `@rocicorp/zero/expo-sqlite` instead. */\nexport type DropStore = sqlite.DropStore;\n\n/** @deprecated Use `Read` from `@rocicorp/zero/expo-sqlite` instead. */\nexport type Read = sqlite.Read;\n\n/** @deprecated Use `Store` from `@rocicorp/zero/expo-sqlite` instead. */\nexport type Store = sqlite.Store;\n\n/** @deprecated Use `StoreProvider` from `@rocicorp/zero/expo-sqlite` instead. */\nexport type StoreProvider = sqlite.StoreProvider;\n\n/** @deprecated Use `Write` from `@rocicorp/zero/expo-sqlite` instead. */\nexport type Write = sqlite.Write;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;AAMO,IAAMA,2BAA+B;AAGrC,IAAMC,iCACJ;AAGF,IAAMC,aAAmB;AAGzB,IAAMC,eAAqB;",
6
+ "names": ["expoSQLiteStoreProvider", "clearAllNamedStoresForTesting", "dropStore", "SQLiteStore"]
7
7
  }
package/out/react.js CHANGED
@@ -1,6 +1,9 @@
1
+ import {
2
+ MarkIcon
3
+ } from "./chunk-VZOYWIRW.js";
1
4
  import {
2
5
  Zero
3
- } from "./chunk-5OBZ7D27.js";
6
+ } from "./chunk-JYK4XJDC.js";
4
7
  import "./chunk-ASRS2LFV.js";
5
8
  import {
6
9
  DEFAULT_TTL_MS
@@ -8,9 +11,6 @@ import {
8
11
  import {
9
12
  hasOwn
10
13
  } from "./chunk-EZM3XBAB.js";
11
- import {
12
- MarkIcon
13
- } from "./chunk-VZOYWIRW.js";
14
14
  import "./chunk-424PT5DM.js";
15
15
 
16
16
  // ../zero-react/src/components/zero-inspector.tsx
@@ -0,0 +1,2 @@
1
+ export { expoSQLiteStoreProvider, type ExpoSQLiteStoreOptions, } from './kv/expo-sqlite/store.ts';
2
+ //# sourceMappingURL=expo-sqlite.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expo-sqlite.d.ts","sourceRoot":"","sources":["../../../../replicache/src/expo-sqlite.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,KAAK,sBAAsB,GAC5B,MAAM,2BAA2B,CAAC"}
@@ -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"}
@@ -0,0 +1,2 @@
1
+ export { opSQLiteStoreProvider, type OpSQLiteStoreOptions, } from './kv/op-sqlite/store.ts';
2
+ //# sourceMappingURL=op-sqlite.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"op-sqlite.d.ts","sourceRoot":"","sources":["../../../../replicache/src/op-sqlite.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,KAAK,oBAAoB,GAC1B,MAAM,yBAAyB,CAAC"}
package/out/solid.js CHANGED
@@ -1,9 +1,9 @@
1
- import "./chunk-ACPVJXLI.js";
1
+ import "./chunk-KSBP27P7.js";
2
2
  import {
3
3
  Zero,
4
4
  applyChange,
5
5
  idSymbol
6
- } from "./chunk-5OBZ7D27.js";
6
+ } from "./chunk-JYK4XJDC.js";
7
7
  import "./chunk-ASRS2LFV.js";
8
8
  import {
9
9
  DEFAULT_TTL_MS
package/out/sqlite.js CHANGED
@@ -1,3 +1,4 @@
1
+ import "./chunk-AFADJQ2O.js";
1
2
  import {
2
3
  SQLiteStore,
3
4
  clearAllNamedStoresForTesting,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rocicorp/zero",
3
- "version": "0.24.2025101403",
3
+ "version": "0.24.2025101700",
4
4
  "description": "Zero is a web framework for serverless web development.",
5
5
  "author": "Rocicorp, Inc.",
6
6
  "repository": {
@@ -15,10 +15,10 @@
15
15
  },
16
16
  "scripts": {
17
17
  "build": "rm -rf out && npm run build-server && npm run build-client",
18
- "build-client": "tsc -p tsconfig.client.json && npx tsx tool/build.js",
18
+ "build-client": "tsc -p tsconfig.client.json && tsx tool/build.js",
19
19
  "build-server": "tsc -p tsconfig.server.json && chmod +x out/zero/src/cli.js out/zero/src/build-schema.js out/zero/src/deploy-permissions.js out/zero/src/zero-cache-dev.js out/zero/src/ast-to-zql.js out/zero/src/analyze-query.js out/zero/src/transform-query.js",
20
- "check-types": "tsc",
21
- "check-types:watch": "tsc --watch",
20
+ "check-types": "tsc -p tsconfig.client.json -p tsconfig.server.json",
21
+ "check-types:watch": "tsc -p tsconfig.client.json -p tsconfig.server.json --watch",
22
22
  "format": "prettier --write .",
23
23
  "check-format": "prettier --check .",
24
24
  "lint": "oxlint --type-aware src/",
@@ -47,7 +47,7 @@
47
47
  "@rocicorp/lock": "^1.0.4",
48
48
  "@rocicorp/logger": "^5.4.0",
49
49
  "@rocicorp/resolver": "^1.0.2",
50
- "@rocicorp/zero-sqlite3": "^1.0.9",
50
+ "@rocicorp/zero-sqlite3": "^1.0.11",
51
51
  "@types/basic-auth": "^1.1.8",
52
52
  "basic-auth": "^2.0.1",
53
53
  "chalk": "^5.3.0",
@@ -73,14 +73,17 @@
73
73
  "semver": "^7.5.4",
74
74
  "tsx": "^4.19.1",
75
75
  "url-pattern": "^1.0.3",
76
+ "urlpattern-polyfill": "^10.1.0",
76
77
  "ws": "^8.18.1"
77
78
  },
78
79
  "devDependencies": {
79
- "@rocicorp/prettier-config": "^0.3.0",
80
+ "@op-engineering/op-sqlite": ">=15",
81
+ "@rocicorp/prettier-config": "^0.4.0",
80
82
  "@vitest/runner": "3.2.4",
81
83
  "analyze-query": "0.0.0",
82
84
  "ast-to-zql": "0.0.0",
83
- "esbuild": "^0.25.0",
85
+ "esbuild": "^0.25.10",
86
+ "expo-sqlite": ">=15",
84
87
  "replicache": "15.2.1",
85
88
  "shared": "0.0.0",
86
89
  "typedoc": "^0.28.2",
@@ -91,11 +94,22 @@
91
94
  "zero-client": "0.0.0",
92
95
  "zero-pg": "0.0.0",
93
96
  "zero-react": "0.0.0",
94
- "zero-react-native": "0.0.0",
95
97
  "zero-server": "0.0.0",
96
98
  "zero-solid": "0.0.0",
97
99
  "zqlite": "0.0.0"
98
100
  },
101
+ "peerDependencies": {
102
+ "expo-sqlite": ">=15",
103
+ "@op-engineering/op-sqlite": ">=15"
104
+ },
105
+ "peerDependenciesMeta": {
106
+ "expo-sqlite": {
107
+ "optional": true
108
+ },
109
+ "@op-engineering/op-sqlite": {
110
+ "optional": true
111
+ }
112
+ },
99
113
  "type": "module",
100
114
  "main": "out/zero.js",
101
115
  "module": "out/zero.js",
@@ -105,49 +119,57 @@
105
119
  "types": "./out/zero-client/src/mod.d.ts",
106
120
  "default": "./out/zero.js"
107
121
  },
122
+ "./change-protocol/v0": {
123
+ "types": "./out/zero/src/change-protocol/v0.d.ts",
124
+ "default": "./out/zero/src/change-protocol/v0.js"
125
+ },
126
+ "./expo-sqlite": {
127
+ "types": "./out/zero/src/expo-sqlite.d.ts",
128
+ "default": "./out/expo-sqlite.js"
129
+ },
130
+ "./op-sqlite": {
131
+ "types": "./out/zero/src/op-sqlite.d.ts",
132
+ "default": "./out/op-sqlite.js"
133
+ },
134
+ "./pg": {
135
+ "types": "./out/zero-pg/src/mod.d.ts",
136
+ "default": "./out/zero/src/pg.js"
137
+ },
108
138
  "./react": {
109
139
  "types": "./out/zero-react/src/mod.d.ts",
110
140
  "default": "./out/react.js"
111
141
  },
142
+ "./react-native": {
143
+ "types": "./out/zero-react-native/src/mod.d.ts",
144
+ "default": "./out/react-native.js"
145
+ },
112
146
  "./server": {
113
147
  "types": "./out/zero-server/src/mod.d.ts",
114
148
  "default": "./out/zero/src/server.js"
115
149
  },
116
- "./server/adapters/postgresjs": {
117
- "types": "./out/zero-server/src/adapters/postgresjs.d.ts",
118
- "default": "./out/zero/src/adapters/postgresjs.js"
150
+ "./server/adapters/drizzle": {
151
+ "types": "./out/zero-server/src/adapters/drizzle.d.ts",
152
+ "default": "./out/zero/src/adapters/drizzle.js"
119
153
  },
120
154
  "./server/adapters/pg": {
121
155
  "types": "./out/zero-server/src/adapters/pg.d.ts",
122
156
  "default": "./out/zero/src/adapters/pg.js"
123
157
  },
124
- "./server/adapters/drizzle": {
125
- "types": "./out/zero-server/src/adapters/drizzle.d.ts",
126
- "default": "./out/zero/src/adapters/drizzle.js"
158
+ "./server/adapters/postgresjs": {
159
+ "types": "./out/zero-server/src/adapters/postgresjs.d.ts",
160
+ "default": "./out/zero/src/adapters/postgresjs.js"
127
161
  },
128
162
  "./solid": {
129
163
  "types": "./out/zero-solid/src/mod.d.ts",
130
164
  "default": "./out/solid.js"
131
165
  },
132
- "./change-protocol/v0": {
133
- "types": "./out/zero/src/change-protocol/v0.d.ts",
134
- "default": "./out/zero/src/change-protocol/v0.js"
135
- },
136
- "./pg": {
137
- "types": "./out/zero-pg/src/mod.d.ts",
138
- "default": "./out/zero/src/pg.js"
166
+ "./sqlite": {
167
+ "types": "./out/zero/src/sqlite.d.ts",
168
+ "default": "./out/sqlite.js"
139
169
  },
140
170
  "./zqlite": {
141
171
  "types": "./out/zqlite/src/mod.d.ts",
142
172
  "default": "./out/zero/src/zqlite.js"
143
- },
144
- "./react-native": {
145
- "types": "./out/zero-react-native/src/mod.d.ts",
146
- "default": "./out/react-native.js"
147
- },
148
- "./sqlite": {
149
- "types": "./out/zero/src/sqlite.d.ts",
150
- "default": "./out/sqlite.js"
151
173
  }
152
174
  },
153
175
  "bin": {
@@ -0,0 +1,2 @@
1
+ export * from '../../replicache/src/expo-sqlite.ts';
2
+ //# sourceMappingURL=expo-sqlite.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expo-sqlite.d.ts","sourceRoot":"","sources":["../../../src/expo-sqlite.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from '../../replicache/src/op-sqlite.ts';
2
+ //# sourceMappingURL=op-sqlite.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"op-sqlite.d.ts","sourceRoot":"","sources":["../../../src/op-sqlite.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC"}
@@ -1,2 +1,31 @@
1
- export * from '../../zero-react-native/src/mod.ts';
1
+ import * as expo from './expo-sqlite.ts';
2
+ import * as sqlite from './sqlite.ts';
3
+ /** @deprecated Use `expoSQLiteStoreProvider` from `@rocicorp/zero/expo-sqlite` instead. */
4
+ export declare const expoSQLiteStoreProvider: typeof expo.expoSQLiteStoreProvider;
5
+ /** @deprecated Use `clearAllNamedStoresForTesting` from `@rocicorp/zero/expo-sqlite` instead. */
6
+ export declare const clearAllNamedStoresForTesting: typeof sqlite.clearAllNamedStoresForTesting;
7
+ /** @deprecated Use `dropStore` from `@rocicorp/zero/expo-sqlite` instead. */
8
+ export declare const dropStore: typeof sqlite.dropStore;
9
+ /** @deprecated Use `SQLiteStore` from `@rocicorp/zero/expo-sqlite` instead. */
10
+ export declare const SQLiteStore: typeof sqlite.SQLiteStore;
11
+ /** @deprecated Use `ExpoSQLiteStoreOptions` from `@rocicorp/zero/expo-sqlite` instead. */
12
+ export type ExpoSQLiteStoreOptions = expo.ExpoSQLiteStoreOptions;
13
+ /** @deprecated Use `PreparedStatement` from `@rocicorp/zero/expo-sqlite` instead. */
14
+ export type PreparedStatement = sqlite.PreparedStatement;
15
+ /** @deprecated Use `SQLiteDatabase` from `@rocicorp/zero/expo-sqlite` instead. */
16
+ export type SQLiteDatabase = sqlite.SQLiteDatabase;
17
+ /** @deprecated Use `SQLiteStoreOptions` from `@rocicorp/zero/expo-sqlite` instead. */
18
+ export type SQLiteStoreOptions = sqlite.SQLiteStoreOptions;
19
+ /** @deprecated Use `CreateStore` from `@rocicorp/zero/expo-sqlite` instead. */
20
+ export type CreateStore = sqlite.CreateStore;
21
+ /** @deprecated Use `DropStore` from `@rocicorp/zero/expo-sqlite` instead. */
22
+ export type DropStore = sqlite.DropStore;
23
+ /** @deprecated Use `Read` from `@rocicorp/zero/expo-sqlite` instead. */
24
+ export type Read = sqlite.Read;
25
+ /** @deprecated Use `Store` from `@rocicorp/zero/expo-sqlite` instead. */
26
+ export type Store = sqlite.Store;
27
+ /** @deprecated Use `StoreProvider` from `@rocicorp/zero/expo-sqlite` instead. */
28
+ export type StoreProvider = sqlite.StoreProvider;
29
+ /** @deprecated Use `Write` from `@rocicorp/zero/expo-sqlite` instead. */
30
+ export type Write = sqlite.Write;
2
31
  //# sourceMappingURL=react-native.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"react-native.d.ts","sourceRoot":"","sources":["../../../src/react-native.ts"],"names":[],"mappings":"AACA,cAAc,oCAAoC,CAAC"}
1
+ {"version":3,"file":"react-native.d.ts","sourceRoot":"","sources":["../../../src/react-native.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,kBAAkB,CAAC;AACzC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAItC,2FAA2F;AAC3F,eAAO,MAAM,uBAAuB,qCAA+B,CAAC;AAEpE,iGAAiG;AACjG,eAAO,MAAM,6BAA6B,6CACJ,CAAC;AAEvC,6EAA6E;AAC7E,eAAO,MAAM,SAAS,yBAAmB,CAAC;AAE1C,+EAA+E;AAC/E,eAAO,MAAM,WAAW,2BAAqB,CAAC;AAE9C,0FAA0F;AAC1F,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,sBAAsB,CAAC;AAEjE,qFAAqF;AACrF,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAEzD,kFAAkF;AAClF,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AAEnD,sFAAsF;AACtF,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAE3D,+EAA+E;AAC/E,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AAE7C,6EAA6E;AAC7E,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AAEzC,wEAAwE;AACxE,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;AAE/B,yEAAyE;AACzE,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;AAEjC,iFAAiF;AACjF,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;AAEjD,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