@powersync/web 0.0.0-dev-20241119081147 → 0.0.0-dev-20250127153955

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 (67) hide show
  1. package/README.md +33 -0
  2. package/dist/3cb48be086dd9edd02ff.wasm +0 -0
  3. package/dist/_journeyapps_wa-sqlite-_journeyapps_wa-sqlite_src_examples_IDBBatchAtomicVFS_js-_powersync_co-780aa20.index.umd.js +335 -0
  4. package/dist/_journeyapps_wa-sqlite-_journeyapps_wa-sqlite_src_examples_IDBBatchAtomicVFS_js-_powersync_co-780aa20.index.umd.js.map +1 -0
  5. package/dist/_journeyapps_wa-sqlite-_journeyapps_wa-sqlite_src_examples_IDBBatchAtomicVFS_js-_powersync_co-780aa21.index.umd.js +335 -0
  6. package/dist/_journeyapps_wa-sqlite-_journeyapps_wa-sqlite_src_examples_IDBBatchAtomicVFS_js-_powersync_co-780aa21.index.umd.js.map +1 -0
  7. package/dist/df958358cadf945bd0fe.wasm +0 -0
  8. package/dist/f9c8ada26c59f5bf4339.wasm +0 -0
  9. package/dist/fe5693c7678cf12e05ac.wasm +0 -0
  10. package/dist/index.umd.js +3716 -626
  11. package/dist/index.umd.js.map +1 -1
  12. package/dist/worker/SharedSyncImplementation.umd.js +275 -2200
  13. package/dist/worker/SharedSyncImplementation.umd.js.map +1 -1
  14. package/dist/worker/WASQLiteDB.umd.js +956 -395
  15. package/dist/worker/WASQLiteDB.umd.js.map +1 -1
  16. package/dist/worker/node_modules_journeyapps_wa-sqlite_dist_mc-wa-sqlite-async_mjs.umd.js +45 -0
  17. package/dist/worker/node_modules_journeyapps_wa-sqlite_dist_mc-wa-sqlite-async_mjs.umd.js.map +1 -0
  18. package/dist/worker/node_modules_journeyapps_wa-sqlite_dist_mc-wa-sqlite_mjs.umd.js +45 -0
  19. package/dist/worker/node_modules_journeyapps_wa-sqlite_dist_mc-wa-sqlite_mjs.umd.js.map +1 -0
  20. package/dist/worker/node_modules_journeyapps_wa-sqlite_dist_wa-sqlite-async_mjs.umd.js +2 -132
  21. package/dist/worker/node_modules_journeyapps_wa-sqlite_dist_wa-sqlite-async_mjs.umd.js.map +1 -1
  22. package/dist/worker/node_modules_journeyapps_wa-sqlite_dist_wa-sqlite_mjs.umd.js +45 -0
  23. package/dist/worker/node_modules_journeyapps_wa-sqlite_dist_wa-sqlite_mjs.umd.js.map +1 -0
  24. package/dist/worker/node_modules_journeyapps_wa-sqlite_src_examples_AccessHandlePoolVFS_js.umd.js +1509 -0
  25. package/dist/worker/node_modules_journeyapps_wa-sqlite_src_examples_AccessHandlePoolVFS_js.umd.js.map +1 -0
  26. package/dist/worker/node_modules_journeyapps_wa-sqlite_src_examples_IDBBatchAtomicVFS_js.umd.js +1746 -1372
  27. package/dist/worker/node_modules_journeyapps_wa-sqlite_src_examples_IDBBatchAtomicVFS_js.umd.js.map +1 -1
  28. package/dist/worker/node_modules_journeyapps_wa-sqlite_src_examples_OPFSCoopSyncVFS_js.umd.js +1641 -0
  29. package/dist/worker/node_modules_journeyapps_wa-sqlite_src_examples_OPFSCoopSyncVFS_js.umd.js.map +1 -0
  30. package/lib/package.json +6 -6
  31. package/lib/src/db/PowerSyncDatabase.d.ts +10 -2
  32. package/lib/src/db/PowerSyncDatabase.js +20 -4
  33. package/lib/src/db/adapters/AbstractWebSQLOpenFactory.d.ts +2 -0
  34. package/lib/src/db/adapters/AbstractWebSQLOpenFactory.js +3 -0
  35. package/lib/src/db/adapters/AsyncDatabaseConnection.d.ts +26 -0
  36. package/lib/src/db/adapters/LockedAsyncDatabaseAdapter.d.ts +82 -0
  37. package/lib/src/db/adapters/LockedAsyncDatabaseAdapter.js +239 -0
  38. package/lib/src/db/adapters/WebDBAdapter.d.ts +17 -0
  39. package/lib/src/db/adapters/WebDBAdapter.js +1 -0
  40. package/lib/src/db/adapters/WorkerWrappedAsyncDatabaseConnection.d.ts +39 -0
  41. package/lib/src/db/adapters/WorkerWrappedAsyncDatabaseConnection.js +46 -0
  42. package/lib/src/db/adapters/wa-sqlite/WASQLiteConnection.d.ts +127 -0
  43. package/lib/src/db/adapters/wa-sqlite/WASQLiteConnection.js +343 -0
  44. package/lib/src/db/adapters/wa-sqlite/WASQLiteDBAdapter.d.ts +12 -43
  45. package/lib/src/db/adapters/wa-sqlite/WASQLiteDBAdapter.js +36 -209
  46. package/lib/src/db/adapters/wa-sqlite/WASQLiteOpenFactory.d.ts +12 -0
  47. package/lib/src/db/adapters/wa-sqlite/WASQLiteOpenFactory.js +81 -4
  48. package/lib/src/db/adapters/web-sql-flags.d.ts +26 -0
  49. package/lib/src/db/adapters/web-sql-flags.js +5 -0
  50. package/lib/src/db/sync/SharedWebStreamingSyncImplementation.d.ts +9 -2
  51. package/lib/src/db/sync/SharedWebStreamingSyncImplementation.js +17 -12
  52. package/lib/src/db/sync/WebStreamingSyncImplementation.d.ts +0 -5
  53. package/lib/src/index.d.ts +8 -7
  54. package/lib/src/index.js +8 -7
  55. package/lib/src/worker/db/WASQLiteDB.worker.js +38 -20
  56. package/lib/src/worker/db/open-worker-database.d.ts +5 -4
  57. package/lib/src/worker/db/open-worker-database.js +5 -3
  58. package/lib/src/worker/sync/AbstractSharedSyncClientProvider.d.ts +1 -0
  59. package/lib/src/worker/sync/SharedSyncImplementation.d.ts +20 -3
  60. package/lib/src/worker/sync/SharedSyncImplementation.js +40 -11
  61. package/lib/tsconfig.tsbuildinfo +1 -1
  62. package/package.json +7 -7
  63. package/dist/5fe5ed837a91c836c24f.wasm +0 -0
  64. package/lib/src/shared/open-db.d.ts +0 -5
  65. package/lib/src/shared/open-db.js +0 -192
  66. package/lib/src/shared/types.d.ts +0 -22
  67. /package/lib/src/{shared/types.js → db/adapters/AsyncDatabaseConnection.js} +0 -0
@@ -1,22 +0,0 @@
1
- import type { BatchedUpdateNotification, QueryResult } from '@powersync/common';
2
- export type WASQLExecuteResult = Omit<QueryResult, 'rows'> & {
3
- rows: {
4
- _array: any[];
5
- length: number;
6
- };
7
- };
8
- export type DBFunctionsInterface = {
9
- close?: () => void;
10
- execute: WASQLiteExecuteMethod;
11
- executeBatch: WASQLiteExecuteBatchMethod;
12
- registerOnTableChange: (callback: OnTableChangeCallback) => void;
13
- };
14
- /**
15
- * @deprecated use [DBFunctionsInterface instead]
16
- */
17
- export type DBWorkerInterface = DBFunctionsInterface;
18
- export type WASQLiteExecuteMethod = (sql: string, params?: any[]) => Promise<WASQLExecuteResult>;
19
- export type WASQLiteExecuteBatchMethod = (sql: string, params?: any[]) => Promise<WASQLExecuteResult>;
20
- export type OnTableChangeCallback = (event: BatchedUpdateNotification) => void;
21
- export type OpenDB = (dbFileName: string) => DBWorkerInterface;
22
- export type SQLBatchTuple = [string] | [string, Array<any> | Array<Array<any>>];