@powersync/web 0.0.0-dev-20251126195153 → 0.0.0-dev-20251127205344
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/dist/index.umd.js +46 -34
- package/dist/index.umd.js.map +1 -1
- package/dist/worker/SharedSyncImplementation.umd.js +27 -17
- package/dist/worker/SharedSyncImplementation.umd.js.map +1 -1
- package/lib/src/db/sync/SharedWebStreamingSyncImplementation.d.ts +1 -1
- package/lib/src/db/sync/SharedWebStreamingSyncImplementation.js +15 -13
- package/lib/src/worker/sync/SharedSyncImplementation.js +21 -11
- package/lib/src/worker/sync/WorkerClient.d.ts +1 -1
- package/lib/src/worker/sync/WorkerClient.js +2 -2
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/db/sync/SharedWebStreamingSyncImplementation.ts +18 -16
- package/src/worker/sync/SharedSyncImplementation.ts +23 -13
- package/src/worker/sync/WorkerClient.ts +5 -4
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { ILogLevel, PowerSyncConnectionOptions, SubscribedStream, SyncStatusOptions } from '@powersync/common';
|
|
1
2
|
import * as Comlink from 'comlink';
|
|
3
|
+
import { getNavigatorLocks } from '../../shared/navigator';
|
|
2
4
|
import {
|
|
3
5
|
ManualSharedSyncPayload,
|
|
4
6
|
SharedSyncClientEvent,
|
|
@@ -6,8 +8,6 @@ import {
|
|
|
6
8
|
SharedSyncInitOptions,
|
|
7
9
|
WrappedSyncPort
|
|
8
10
|
} from './SharedSyncImplementation';
|
|
9
|
-
import { ILogLevel, PowerSyncConnectionOptions, SubscribedStream, SyncStatusOptions } from '@powersync/common';
|
|
10
|
-
import { getNavigatorLocks } from '../../shared/navigator';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* A client to the shared sync worker.
|
|
@@ -21,7 +21,9 @@ export class WorkerClient {
|
|
|
21
21
|
constructor(
|
|
22
22
|
private readonly sync: SharedSyncImplementation,
|
|
23
23
|
private readonly port: MessagePort
|
|
24
|
-
) {
|
|
24
|
+
) {
|
|
25
|
+
Comlink.expose(this, this.port);
|
|
26
|
+
}
|
|
25
27
|
|
|
26
28
|
async initialize() {
|
|
27
29
|
/**
|
|
@@ -36,7 +38,6 @@ export class WorkerClient {
|
|
|
36
38
|
});
|
|
37
39
|
|
|
38
40
|
this.resolvedPort = await this.sync.addPort(this.port);
|
|
39
|
-
Comlink.expose(this, this.port);
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
private async removePort() {
|