@anfenn/dync 1.0.30 → 1.0.32

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 (52) hide show
  1. package/README.md +31 -9
  2. package/dist/capacitor.cjs +2 -2
  3. package/dist/capacitor.cjs.map +1 -1
  4. package/dist/capacitor.d.cts +1 -1
  5. package/dist/capacitor.d.ts +1 -1
  6. package/dist/capacitor.js +1 -1
  7. package/dist/{chunk-SQB6E7V2.js → chunk-XAHQXK76.js} +3 -3
  8. package/dist/{chunk-SQB6E7V2.js.map → chunk-XAHQXK76.js.map} +1 -1
  9. package/dist/{dexie-T9m1mP1h.d.cts → dexie-3VOQSn1s.d.cts} +5 -5
  10. package/dist/{dexie-BFPA0JU2.d.ts → dexie-D85rTx4g.d.ts} +5 -5
  11. package/dist/dexie.d.cts +2 -2
  12. package/dist/dexie.d.ts +2 -2
  13. package/dist/expoSqlite.d.cts +1 -1
  14. package/dist/expoSqlite.d.ts +1 -1
  15. package/dist/index.cjs +11 -23
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.d.cts +9 -9
  18. package/dist/index.d.ts +9 -9
  19. package/dist/index.js +11 -23
  20. package/dist/index.js.map +1 -1
  21. package/dist/node.cjs +5 -5
  22. package/dist/node.cjs.map +1 -1
  23. package/dist/node.d.cts +9 -9
  24. package/dist/node.d.ts +9 -9
  25. package/dist/node.js +4 -4
  26. package/dist/node.js.map +1 -1
  27. package/dist/react/index.d.cts +3 -3
  28. package/dist/react/index.d.ts +3 -3
  29. package/dist/{types-CSbIAfu2.d.cts → types-6-NyRQ0D.d.cts} +3 -11
  30. package/dist/{types-CSbIAfu2.d.ts → types-6-NyRQ0D.d.ts} +3 -11
  31. package/dist/{types-DW42y281.d.cts → types-BszcepJK.d.cts} +1 -1
  32. package/dist/{types-n8Zge2zF.d.ts → types-Dhx9MuUp.d.ts} +1 -1
  33. package/dist/wa-sqlite.cjs +9 -9
  34. package/dist/wa-sqlite.cjs.map +1 -1
  35. package/dist/wa-sqlite.d.cts +13 -13
  36. package/dist/wa-sqlite.d.ts +13 -13
  37. package/dist/wa-sqlite.js +8 -8
  38. package/dist/wa-sqlite.js.map +1 -1
  39. package/package.json +2 -2
  40. package/src/index.native.ts +1 -1
  41. package/src/index.shared.ts +5 -14
  42. package/src/index.ts +1 -1
  43. package/src/node.ts +1 -1
  44. package/src/storage/sqlite/SQLiteAdapter.ts +10 -13
  45. package/src/storage/sqlite/{SqliteQueryContext.ts → SQLiteQueryContext.ts} +1 -1
  46. package/src/storage/sqlite/drivers/{BetterSqlite3Driver.ts → BetterSQLite3Driver.ts} +8 -8
  47. package/src/storage/sqlite/drivers/CapacitorSQLiteDriver.ts +2 -2
  48. package/src/storage/sqlite/drivers/{WaSqliteDriver.ts → WaSQLiteDriver.ts} +20 -20
  49. package/src/storage/sqlite/index.ts +1 -1
  50. package/src/storage/sqlite/types.ts +2 -12
  51. package/src/storage/types.ts +2 -2
  52. package/src/wa-sqlite.ts +1 -1
@@ -128,12 +128,7 @@ export interface SQLiteDatabaseDriver {
128
128
  query(statement: string, values?: any[]): Promise<SQLiteQueryResult>;
129
129
  }
130
130
 
131
- export type SQLiteMigrationDirection = 'upgrade' | 'downgrade';
132
-
133
131
  export interface SQLiteMigrationContext {
134
- direction: SQLiteMigrationDirection;
135
- fromVersion: number;
136
- toVersion: number;
137
132
  execute: (statement: string) => Promise<void>;
138
133
  run: (statement: string, values?: any[]) => Promise<SQLiteRunResult>;
139
134
  query: (statement: string, values?: any[]) => Promise<SQLiteQueryResult>;
@@ -142,13 +137,8 @@ export interface SQLiteMigrationContext {
142
137
  export type SQLiteMigrationHandler = (context: SQLiteMigrationContext) => Promise<void> | void;
143
138
 
144
139
  export interface SQLiteVersionMigration {
145
- upgrade?: SQLiteMigrationHandler;
146
- downgrade?: SQLiteMigrationHandler;
147
- }
148
-
149
- export interface SQLiteVersionConfigurator {
150
- upgrade(handler: SQLiteMigrationHandler): void;
151
- downgrade(handler: SQLiteMigrationHandler): void;
140
+ up?: SQLiteMigrationHandler;
141
+ down?: SQLiteMigrationHandler;
152
142
  }
153
143
 
154
144
  export interface SQLiteSchemaDefinitionOptions {
@@ -2,7 +2,7 @@ import type { DexieQueryContext } from './dexie/DexieQueryContext';
2
2
  import type { MemoryQueryContext } from './memory/MemoryQueryContext';
3
3
  import type { TableSchemaDefinition } from './sqlite/schema';
4
4
  import type { StorageSchemaDefinitionOptions } from './sqlite/types';
5
- import type { SqliteQueryContext } from './sqlite/SqliteQueryContext';
5
+ import type { SQLiteQueryContext } from './sqlite/SQLiteQueryContext';
6
6
 
7
7
  export type TransactionMode = 'r' | 'rw';
8
8
 
@@ -15,7 +15,7 @@ export interface StorageAdapter {
15
15
  defineSchema(version: number, schema: Record<string, TableSchemaDefinition>, options?: StorageSchemaDefinitionOptions): void;
16
16
  table<T = any>(name: string): StorageTable<T>;
17
17
  transaction<T>(mode: TransactionMode, tableNames: string[], callback: (context: StorageTransactionContext) => Promise<T>): Promise<T>;
18
- query<R>(callback: (ctx: DexieQueryContext | SqliteQueryContext | MemoryQueryContext) => Promise<R>): Promise<R>;
18
+ query<R>(callback: (ctx: DexieQueryContext | SQLiteQueryContext | MemoryQueryContext) => Promise<R>): Promise<R>;
19
19
  }
20
20
 
21
21
  export interface StorageTransactionContext {
package/src/wa-sqlite.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  // wa-sqlite Browser SQLite Driver
2
2
  // Import this entry point for browser/web builds with SQLite support
3
- export { WaSqliteDriver, type WaSqliteDriverOptions, type WaSqliteVfsType } from './storage/sqlite/drivers/WaSqliteDriver';
3
+ export { WaSQLiteDriver, type WaSQLiteDriverOptions, type WaSQLiteVfsType } from './storage/sqlite/drivers/WaSQLiteDriver';
4
4
  export type { SQLiteDatabaseDriver, SQLiteQueryResult, SQLiteRunResult } from './storage/sqlite/types';