@powersync/web 0.6.0 → 0.7.0
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/README.md +8 -0
- package/lib/src/db/PowerSyncDatabase.js +0 -1
- package/lib/src/db/adapters/AbstractWebPowerSyncDatabaseOpenFactory.js +0 -1
- package/lib/src/db/adapters/SSRDBAdapter.js +0 -1
- package/lib/src/db/adapters/wa-sqlite/WASQLiteDBAdapter.js +0 -1
- package/lib/src/db/adapters/wa-sqlite/WASQLitePowerSyncDatabaseOpenFactory.js +0 -1
- package/lib/src/db/sync/SSRWebStreamingSyncImplementation.js +0 -1
- package/lib/src/db/sync/SharedWebStreamingSyncImplementation.js +0 -1
- package/lib/src/db/sync/WebRemote.d.ts +3 -1
- package/lib/src/db/sync/WebRemote.js +22 -1
- package/lib/src/db/sync/WebStreamingSyncImplementation.js +0 -1
- package/lib/src/index.js +0 -1
- package/lib/src/worker/db/SharedWASQLiteDB.worker.js +0 -1
- package/lib/src/worker/db/WASQLiteDB.worker.js +0 -1
- package/lib/src/worker/db/open-db.js +0 -1
- package/lib/src/worker/db/open-worker-database.js +0 -1
- package/lib/src/worker/sync/AbstractSharedSyncClientProvider.js +0 -1
- package/lib/src/worker/sync/BroadcastLogger.js +0 -1
- package/lib/src/worker/sync/SharedSyncImplementation.js +0 -1
- package/lib/src/worker/sync/SharedSyncImplementation.worker.js +0 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -13
- package/lib/src/db/PowerSyncDatabase.js.map +0 -1
- package/lib/src/db/adapters/AbstractWebPowerSyncDatabaseOpenFactory.js.map +0 -1
- package/lib/src/db/adapters/SSRDBAdapter.js.map +0 -1
- package/lib/src/db/adapters/wa-sqlite/WASQLiteDBAdapter.js.map +0 -1
- package/lib/src/db/adapters/wa-sqlite/WASQLitePowerSyncDatabaseOpenFactory.js.map +0 -1
- package/lib/src/db/sync/SSRWebStreamingSyncImplementation.js.map +0 -1
- package/lib/src/db/sync/SharedWebStreamingSyncImplementation.js.map +0 -1
- package/lib/src/db/sync/WebRemote.js.map +0 -1
- package/lib/src/db/sync/WebStreamingSyncImplementation.js.map +0 -1
- package/lib/src/index.js.map +0 -1
- package/lib/src/worker/db/SharedWASQLiteDB.worker.js.map +0 -1
- package/lib/src/worker/db/WASQLiteDB.worker.js.map +0 -1
- package/lib/src/worker/db/open-db.js.map +0 -1
- package/lib/src/worker/db/open-worker-database.js.map +0 -1
- package/lib/src/worker/sync/AbstractSharedSyncClientProvider.js.map +0 -1
- package/lib/src/worker/sync/BroadcastLogger.js.map +0 -1
- package/lib/src/worker/sync/SharedSyncImplementation.js.map +0 -1
- package/lib/src/worker/sync/SharedSyncImplementation.worker.js.map +0 -1
package/README.md
CHANGED
|
@@ -56,6 +56,14 @@ if (typeof self.Buffer == 'undefined') {
|
|
|
56
56
|
}
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
+
## Webpack
|
|
60
|
+
|
|
61
|
+
See the [example Webpack config](https://github.com/powersync-ja/powersync-js/blob/main/demos/example-webpack/webpack.config.js) for details on polyfills and requirements.
|
|
62
|
+
|
|
63
|
+
## Vite
|
|
64
|
+
|
|
65
|
+
See the [example Vite config](https://github.com/powersync-ja/powersync-js/blob/main/demos/example-vite/vite.config.ts) for details on polyfills and requirements.
|
|
66
|
+
|
|
59
67
|
# Getting Started
|
|
60
68
|
|
|
61
69
|
Our [full SDK reference](https://docs.powersync.com/client-sdk-references/js-web) contains everything you need to know to get started implementing PowerSync in your project.
|
|
@@ -1,4 +1,25 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
1
10
|
import { AbstractRemote } from '@powersync/common';
|
|
2
11
|
export class WebRemote extends AbstractRemote {
|
|
12
|
+
getBSON() {
|
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
14
|
+
if (this._bson) {
|
|
15
|
+
return this._bson;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Dynamic import to be used only when needed.
|
|
19
|
+
*/
|
|
20
|
+
const { BSON } = yield import('bson');
|
|
21
|
+
this._bson = BSON;
|
|
22
|
+
return this._bson;
|
|
23
|
+
});
|
|
24
|
+
}
|
|
3
25
|
}
|
|
4
|
-
//# sourceMappingURL=WebRemote.js.map
|
package/lib/src/index.js
CHANGED
|
@@ -6,4 +6,3 @@ export * from './db/sync/SharedWebStreamingSyncImplementation';
|
|
|
6
6
|
export * from './db/adapters/wa-sqlite/WASQLiteDBAdapter';
|
|
7
7
|
export * from './db/adapters/wa-sqlite/WASQLitePowerSyncDatabaseOpenFactory';
|
|
8
8
|
export * from './db/adapters/AbstractWebPowerSyncDatabaseOpenFactory';
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -10,4 +10,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import * as Comlink from 'comlink';
|
|
11
11
|
import { _openDB } from './open-db';
|
|
12
12
|
Comlink.expose((dbFileName) => __awaiter(void 0, void 0, void 0, function* () { return Comlink.proxy(yield _openDB(dbFileName)); }));
|
|
13
|
-
//# sourceMappingURL=WASQLiteDB.worker.js.map
|
|
@@ -28,4 +28,3 @@ export function openWorkerDatabasePort(workerIdentifier, multipleTabs = true) {
|
|
|
28
28
|
export function getWorkerDatabaseOpener(workerIdentifier, multipleTabs = true) {
|
|
29
29
|
return Comlink.wrap(openWorkerDatabasePort(workerIdentifier, multipleTabs));
|
|
30
30
|
}
|
|
31
|
-
//# sourceMappingURL=open-worker-database.js.map
|