@dittolive/ditto 4.10.2 → 4.11.0-preview.1
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/DittoReactNative.podspec +1 -17
- package/README.md +4 -80
- package/node/ditto.cjs.js +444 -81
- package/node/ditto.darwin-arm64.node +0 -0
- package/node/ditto.darwin-x64.node +0 -0
- package/node/ditto.linux-arm64.node +0 -0
- package/node/ditto.linux-x64.node +0 -0
- package/node/ditto.win32-x64.node +0 -0
- package/package.json +1 -1
- package/react-native/android/build.gradle +29 -34
- package/react-native/android/cpp-adapter.cpp +10 -11
- package/react-native/android/dittoffi/src/ditto_transaction.cpp +1 -0
- package/react-native/android/dittoffi/src/ditto_transaction.h +91 -0
- package/react-native/android/dittoffi/src/dittoffi.h +587 -390
- package/react-native/android/dittoffi/src/dittoffi_java.cpp +3360 -1358
- package/react-native/android/dittoffi/src/dittoffi_java.h +59 -10
- package/react-native/android/dittoffi/src/dittoffi_java.i +2 -0
- package/react-native/android/dittoffi/src/dittostore_java.i +48 -0
- package/react-native/android/dittoffi/src/mesh_java_interfaces.h +81 -109
- package/react-native/android/gradle.properties +6 -5
- package/react-native/android/src/main/java/com/dittolive/rnsdk/DittoRNSDKModule.kt +23 -15
- package/react-native/cpp/include/DQL.h +1 -0
- package/react-native/cpp/include/Differ.h +14 -0
- package/react-native/cpp/include/Lifecycle.h +1 -1
- package/react-native/cpp/include/Transaction.h +18 -0
- package/react-native/cpp/include/Transports.h +1 -0
- package/react-native/cpp/include/Utils.h +27 -3
- package/react-native/cpp/include/main.h +2 -0
- package/react-native/cpp/src/DQL.cpp +21 -0
- package/react-native/cpp/src/Differ.cpp +57 -0
- package/react-native/cpp/src/Lifecycle.cpp +17 -7
- package/react-native/cpp/src/Misc.cpp +50 -32
- package/react-native/cpp/src/Transaction.cpp +195 -0
- package/react-native/cpp/src/Transports.cpp +77 -1
- package/react-native/cpp/src/Utils.cpp +11 -0
- package/react-native/cpp/src/main.cpp +18 -1
- package/react-native/ditto.es6.js +1 -1
- package/react-native/ios/DittoRNSDK.mm +2 -4
- package/types/ditto.d.ts +271 -33
- package/web/ditto.es6.js +1 -1
- package/web/ditto.umd.js +1 -1
- package/web/ditto.wasm +0 -0
- package/react-native/ios/YeetJSIUtils.h +0 -60
- package/react-native/ios/YeetJSIUtils.mm +0 -196
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
#include "main.h"
|
|
4
4
|
#include "Utils.h"
|
|
5
5
|
#include "DQL.h"
|
|
6
|
+
#include "Differ.h"
|
|
6
7
|
#include "Document.h"
|
|
7
8
|
#include "Authentication.h"
|
|
8
9
|
#include "Sync.h"
|
|
@@ -20,6 +21,7 @@
|
|
|
20
21
|
#include "FFIUtils.h"
|
|
21
22
|
#include "ConnectionRequest.h"
|
|
22
23
|
#include "GlobalCallInvoker.h"
|
|
24
|
+
#include "Transaction.h"
|
|
23
25
|
|
|
24
26
|
// Note: `runtime` variable must exist in scope.
|
|
25
27
|
#define REGISTER_JS_FUNCTION(fname) runtime.global().setProperty(runtime, STRINGIFY(fname), fname(runtime));
|
|
@@ -43,7 +45,7 @@ namespace sharedjsi
|
|
|
43
45
|
|
|
44
46
|
// Lifecycle
|
|
45
47
|
REGISTER_JS_FUNCTION(ditto_init_sdk_version);
|
|
46
|
-
REGISTER_JS_FUNCTION(
|
|
48
|
+
REGISTER_JS_FUNCTION(dittoffi_ditto_try_new_blocking);
|
|
47
49
|
REGISTER_JS_FUNCTION(ditto_shutdown);
|
|
48
50
|
REGISTER_JS_FUNCTION(ditto_free);
|
|
49
51
|
|
|
@@ -53,6 +55,14 @@ namespace sharedjsi
|
|
|
53
55
|
REGISTER_JS_FUNCTION(dittoffi_ditto_try_start_sync);
|
|
54
56
|
REGISTER_JS_FUNCTION(dittoffi_ditto_stop_sync);
|
|
55
57
|
|
|
58
|
+
// Transaction
|
|
59
|
+
REGISTER_JS_FUNCTION(dittoffi_store_transactions);
|
|
60
|
+
REGISTER_JS_FUNCTION(dittoffi_store_begin_transaction_async_throws);
|
|
61
|
+
REGISTER_JS_FUNCTION(dittoffi_transaction_complete_async_throws);
|
|
62
|
+
REGISTER_JS_FUNCTION(dittoffi_transaction_execute_async_throws);
|
|
63
|
+
REGISTER_JS_FUNCTION(dittoffi_transaction_info);
|
|
64
|
+
REGISTER_JS_FUNCTION(dittoffi_transaction_free);
|
|
65
|
+
|
|
56
66
|
// FFI Utils
|
|
57
67
|
REGISTER_JS_FUNCTION(refCStringToString);
|
|
58
68
|
REGISTER_JS_FUNCTION(boxCStringIntoString);
|
|
@@ -89,6 +99,12 @@ namespace sharedjsi
|
|
|
89
99
|
REGISTER_JS_FUNCTION(dittoffi_query_result_item_json);
|
|
90
100
|
REGISTER_JS_FUNCTION(dittoffi_query_result_free);
|
|
91
101
|
REGISTER_JS_FUNCTION(dittoffi_query_result_item_free);
|
|
102
|
+
REGISTER_JS_FUNCTION(dittoffi_query_result_item_new);
|
|
103
|
+
|
|
104
|
+
// Differ
|
|
105
|
+
REGISTER_JS_FUNCTION(dittoffi_differ_new);
|
|
106
|
+
REGISTER_JS_FUNCTION(dittoffi_differ_diff);
|
|
107
|
+
REGISTER_JS_FUNCTION(dittoffi_differ_free);
|
|
92
108
|
|
|
93
109
|
// Documents
|
|
94
110
|
REGISTER_JS_FUNCTION(ditto_document_id_query_compatible);
|
|
@@ -155,6 +171,7 @@ namespace sharedjsi
|
|
|
155
171
|
REGISTER_JS_FUNCTION(dittoffi_ditto_try_set_transport_config);
|
|
156
172
|
REGISTER_JS_FUNCTION(dittoffi_ditto_transport_config);
|
|
157
173
|
REGISTER_JS_FUNCTION(dittoffi_ditto_set_cloud_sync_enabled);
|
|
174
|
+
REGISTER_JS_FUNCTION(ditto_register_transport_condition_changed_callback);
|
|
158
175
|
|
|
159
176
|
// Connection Request
|
|
160
177
|
REGISTER_JS_FUNCTION(dittoffi_connection_request_peer_key_string);
|