@dittolive/ditto 4.0.2-experimental.shutdown-support.1.darwin-arm64 → 4.0.3-alpha.linux-ble-fixes
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 +2 -2
- package/node/ditto.cjs.js +6521 -2
- package/node/ditto.darwin-arm64.node +0 -0
- package/node/ditto.darwin-x64.node +0 -0
- package/node/ditto.linux-x64.node +0 -0
- package/node/ditto.win32-x64.node +0 -0
- package/node/transports.darwin-arm64.node +0 -0
- package/node/transports.darwin-x64.node +0 -0
- package/package.json +1 -1
- package/types/ditto.d.ts +55 -75
- package/web/ditto.es6.js +1 -1
- package/web/ditto.umd.js +1 -1
- package/web/ditto.wasm +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dittolive/ditto",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3-alpha.linux-ble-fixes",
|
|
4
4
|
"description": "Ditto is a cross-platform embeddable NoSQL database that can sync with or without an internet connection.",
|
|
5
5
|
"homepage": "https://ditto.live",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
package/types/ditto.d.ts
CHANGED
|
@@ -18,63 +18,8 @@ declare class KeepAlive {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/** @internal */
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
type ObserverManagerConstructorOptions = {
|
|
24
|
-
keepAlive?: KeepAlive;
|
|
25
|
-
register?: (callback: (...args: any[]) => void) => void;
|
|
26
|
-
unregister?: () => void;
|
|
27
|
-
process?: (...args: any[]) => any[];
|
|
28
|
-
};
|
|
29
|
-
/** @internal */
|
|
30
|
-
declare class ObserverManager {
|
|
31
|
-
/** @internal */
|
|
32
|
-
readonly id: string;
|
|
33
|
-
/** @internal */
|
|
34
|
-
readonly keepAlive: KeepAlive | null;
|
|
35
|
-
/** @internal */
|
|
36
|
-
constructor(id: string, options?: ObserverManagerConstructorOptions);
|
|
37
|
-
/** @internal */
|
|
38
|
-
addObserver(callback: any): ObserverToken;
|
|
39
|
-
/** @internal */
|
|
40
|
-
removeObserver(token: ObserverToken): void;
|
|
41
|
-
hasObserver(token: ObserverToken): boolean;
|
|
42
|
-
/** @internal */
|
|
43
|
-
notify(...args: any[]): void;
|
|
44
|
-
/** @internal */
|
|
45
|
-
close(): void;
|
|
46
|
-
/**
|
|
47
|
-
* Can be injected and replaced via constructor options.
|
|
48
|
-
*
|
|
49
|
-
* @abstract
|
|
50
|
-
*/
|
|
51
|
-
protected register(callback: (...args: any[]) => void): void;
|
|
52
|
-
/**
|
|
53
|
-
* Can be injected and replaced via constructor options.
|
|
54
|
-
*
|
|
55
|
-
* @abstract
|
|
56
|
-
*/
|
|
57
|
-
protected unregister(): void;
|
|
58
|
-
/**
|
|
59
|
-
* Can be injected and replaced via constructor options.
|
|
60
|
-
*
|
|
61
|
-
* @abstract
|
|
62
|
-
*/
|
|
63
|
-
protected process(...args: any[]): any[];
|
|
64
|
-
private isClosed;
|
|
65
|
-
private isRegistered;
|
|
66
|
-
private callbacksByToken;
|
|
67
|
-
private constructorOptions;
|
|
68
|
-
private hasObservers;
|
|
69
|
-
private registerIfNeeded;
|
|
70
|
-
private unregisterIfNeeded;
|
|
71
|
-
private finalize;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/** @internal */
|
|
75
|
-
interface ObserverManaging {
|
|
76
|
-
hasObserver(token: ObserverToken): any;
|
|
77
|
-
removeObserver(token: ObserverToken): any;
|
|
21
|
+
interface ObserverRemoving {
|
|
22
|
+
removeObserver(token: any): any;
|
|
78
23
|
}
|
|
79
24
|
/** @internal */
|
|
80
25
|
type ObserverOptions = {
|
|
@@ -88,13 +33,13 @@ type ObserverOptions = {
|
|
|
88
33
|
*/
|
|
89
34
|
declare class Observer {
|
|
90
35
|
/** @internal */
|
|
91
|
-
readonly observerManager:
|
|
36
|
+
readonly observerManager: ObserverRemoving;
|
|
92
37
|
/** @internal */
|
|
93
|
-
readonly token?:
|
|
38
|
+
readonly token?: any;
|
|
94
39
|
/** @internal */
|
|
95
40
|
readonly options?: ObserverOptions;
|
|
96
41
|
/** @internal */
|
|
97
|
-
constructor(observerManager:
|
|
42
|
+
constructor(observerManager: ObserverRemoving, token: any, options?: ObserverOptions);
|
|
98
43
|
/**
|
|
99
44
|
* Returns `true` if the observer has been explicitly stopped via the `stop()`
|
|
100
45
|
* method. Otherwise returns `false`.
|
|
@@ -924,6 +869,56 @@ declare class TransportConfig {
|
|
|
924
869
|
static areListenHTTPsEqual(left: TransportConfigListenHTTP, right: TransportConfigListenHTTP): boolean;
|
|
925
870
|
}
|
|
926
871
|
|
|
872
|
+
/** @internal */
|
|
873
|
+
type ObserverToken = string;
|
|
874
|
+
/** @internal */
|
|
875
|
+
type ObserverManagerConstructorOptions = {
|
|
876
|
+
keepAlive?: KeepAlive;
|
|
877
|
+
register?: (callback: (...args: any[]) => void) => void;
|
|
878
|
+
unregister?: () => void;
|
|
879
|
+
process?: (...args: any[]) => any[];
|
|
880
|
+
};
|
|
881
|
+
/** @internal */
|
|
882
|
+
declare class ObserverManager {
|
|
883
|
+
/** @internal */
|
|
884
|
+
readonly id: string;
|
|
885
|
+
/** @internal */
|
|
886
|
+
readonly keepAlive: KeepAlive | null;
|
|
887
|
+
/** @internal */
|
|
888
|
+
constructor(id: string, options?: ObserverManagerConstructorOptions);
|
|
889
|
+
/** @internal */
|
|
890
|
+
addObserver(callback: any): ObserverToken;
|
|
891
|
+
/** @internal */
|
|
892
|
+
removeObserver(token: ObserverToken): void;
|
|
893
|
+
/** @internal */
|
|
894
|
+
notify(...args: any[]): void;
|
|
895
|
+
/**
|
|
896
|
+
* Can be injected and replaced via constructor options.
|
|
897
|
+
*
|
|
898
|
+
* @abstract
|
|
899
|
+
*/
|
|
900
|
+
protected register(callback: (...args: any[]) => void): void;
|
|
901
|
+
/**
|
|
902
|
+
* Can be injected and replaced via constructor options.
|
|
903
|
+
*
|
|
904
|
+
* @abstract
|
|
905
|
+
*/
|
|
906
|
+
protected unregister(): void;
|
|
907
|
+
/**
|
|
908
|
+
* Can be injected and replaced via constructor options.
|
|
909
|
+
*
|
|
910
|
+
* @abstract
|
|
911
|
+
*/
|
|
912
|
+
protected process(...args: any[]): any[];
|
|
913
|
+
private isRegistered;
|
|
914
|
+
private callbacksByToken;
|
|
915
|
+
private constructorOptions;
|
|
916
|
+
private hasObservers;
|
|
917
|
+
private registerIfNeeded;
|
|
918
|
+
private unregisterIfNeeded;
|
|
919
|
+
private finalize;
|
|
920
|
+
}
|
|
921
|
+
|
|
927
922
|
/**
|
|
928
923
|
* Provides info about the authentication status.
|
|
929
924
|
*/
|
|
@@ -1024,8 +1019,6 @@ declare class Authenticator {
|
|
|
1024
1019
|
/** @internal */
|
|
1025
1020
|
'@ditto.authClientValidityChanged'(isWebValid: boolean, isX509Valid: boolean): void;
|
|
1026
1021
|
/** @internal */
|
|
1027
|
-
close(): void;
|
|
1028
|
-
/** @internal */
|
|
1029
1022
|
protected keepAlive: KeepAlive;
|
|
1030
1023
|
/** @internal */
|
|
1031
1024
|
protected observerManager: ObserverManager;
|
|
@@ -1035,7 +1028,6 @@ declare class OnlineAuthenticator extends Authenticator {
|
|
|
1035
1028
|
loginWithToken(token: string, provider: string): Promise<void>;
|
|
1036
1029
|
loginWithUsernameAndPassword(username: string, password: string, provider: string): Promise<void>;
|
|
1037
1030
|
logout(cleanupFn?: (Ditto: any) => void): Promise<void>;
|
|
1038
|
-
close(): void;
|
|
1039
1031
|
readonly authClientPointer: Pointer<FFIAuthClient>;
|
|
1040
1032
|
readonly authenticationHandler: AuthenticationHandler;
|
|
1041
1033
|
private ditto;
|
|
@@ -1308,8 +1300,6 @@ declare class Presence {
|
|
|
1308
1300
|
observe(didChangeHandler: (presenceGraph: PresenceGraph) => void): Observer;
|
|
1309
1301
|
/** @internal */
|
|
1310
1302
|
constructor(ditto: Ditto);
|
|
1311
|
-
/** @internal */
|
|
1312
|
-
close(): void;
|
|
1313
1303
|
private observerManager;
|
|
1314
1304
|
}
|
|
1315
1305
|
|
|
@@ -1538,15 +1528,9 @@ declare class Ditto {
|
|
|
1538
1528
|
* or has (transitively) had disabled, syncing with v3 SDK peers.
|
|
1539
1529
|
*/
|
|
1540
1530
|
disableSyncWithV3(): void;
|
|
1541
|
-
/**
|
|
1542
|
-
* Shut down Ditto and release all resources. Must be called before recreating a Ditto instance
|
|
1543
|
-
* that uses the same persistence directory.
|
|
1544
|
-
*/
|
|
1545
|
-
close(): Promise<void>;
|
|
1546
1531
|
/** @internal */
|
|
1547
1532
|
keepAlive: KeepAlive;
|
|
1548
1533
|
private sync;
|
|
1549
|
-
private isClosed;
|
|
1550
1534
|
private isWebValid;
|
|
1551
1535
|
private isX509Valid;
|
|
1552
1536
|
private presenceManager;
|
|
@@ -2483,8 +2467,6 @@ declare class ExperimentalStore {
|
|
|
2483
2467
|
* @returns a promise for an array of Ditto documents matching the query
|
|
2484
2468
|
**/
|
|
2485
2469
|
execute(query: string): Promise<Document[]>;
|
|
2486
|
-
/** @internal */
|
|
2487
|
-
close(): void;
|
|
2488
2470
|
}
|
|
2489
2471
|
|
|
2490
2472
|
/**
|
|
@@ -2688,8 +2670,6 @@ declare class Store {
|
|
|
2688
2670
|
write(callback: (transaction: WriteTransaction) => Promise<void>): Promise<WriteTransactionResult[]>;
|
|
2689
2671
|
/** @internal */
|
|
2690
2672
|
constructor(ditto: Ditto);
|
|
2691
|
-
/** @internal */
|
|
2692
|
-
close(): void;
|
|
2693
2673
|
/**
|
|
2694
2674
|
* Private method, used only by the Portal https://github.com/getditto/ditto/pull/3652
|
|
2695
2675
|
* @internal
|