@dittolive/ditto 4.12.2-experimental.bp-receive-timeout.4 → 4.12.2-rc.2
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 +1 -1
- 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/cpp/src/Transports.cpp +7 -6
- package/react-native/ditto.es6.js +1 -1
- package/web/ditto.es6.js +1 -1
- package/web/ditto.umd.js +1 -1
- package/web/ditto.wasm +0 -0
package/README.md
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
_Ditto is a cross-platform SDK that allows mobile, web, and IoT apps to sync
|
|
4
4
|
with and even without connectivity._
|
|
5
5
|
|
|
6
|
-
Version: **4.12.2-
|
|
6
|
+
Version: **4.12.2-rc.2**
|
|
7
7
|
|
|
8
8
|
For more information please visit [ditto.com](https://ditto.com), as well as the
|
|
9
|
-
[API Reference](https://software.ditto.live/js/Ditto/4.12.2-
|
|
9
|
+
[API Reference](https://software.ditto.live/js/Ditto/4.12.2-rc.2/api-reference/) for this particular version.
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
package/node/ditto.cjs.js
CHANGED
|
@@ -2393,7 +2393,7 @@ class AttachmentToken {
|
|
|
2393
2393
|
|
|
2394
2394
|
// NOTE: this is patched up with the actual build version by Jake task
|
|
2395
2395
|
// build:package and has to be a valid semantic version as defined here: https://semver.org.
|
|
2396
|
-
const fullBuildVersionString = '4.12.2-
|
|
2396
|
+
const fullBuildVersionString = '4.12.2-rc.2';
|
|
2397
2397
|
|
|
2398
2398
|
//
|
|
2399
2399
|
// Copyright © 2021 DittoLive Incorporated. All rights reserved.
|
|
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.12.2-
|
|
3
|
+
"version": "4.12.2-rc.2",
|
|
4
4
|
"description": "Ditto is a cross-platform SDK that allows apps to sync with and even without internet connectivity.",
|
|
5
5
|
"homepage": "https://ditto.com",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
#include "Arc.hpp"
|
|
3
3
|
#include <Transports.h>
|
|
4
4
|
#include <map>
|
|
5
|
+
#include <unordered_map>
|
|
5
6
|
|
|
6
7
|
namespace sharedjsi
|
|
7
8
|
{
|
|
@@ -22,8 +23,8 @@ void v_transport_condition_change_cb(void *ctx, ConditionSource_t condition_sour
|
|
|
22
23
|
{CONDITION_SOURCE_MDNS, "Mdns"},
|
|
23
24
|
{CONDITION_SOURCE_WIFI_AWARE, "WiFiAware"}
|
|
24
25
|
};
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
|
|
27
|
+
|
|
27
28
|
std::string condition_source_str;
|
|
28
29
|
auto it = conditionSourceToString.find(condition_source);
|
|
29
30
|
if (it != conditionSourceToString.end()) {
|
|
@@ -31,7 +32,7 @@ void v_transport_condition_change_cb(void *ctx, ConditionSource_t condition_sour
|
|
|
31
32
|
} else {
|
|
32
33
|
throw std::invalid_argument("Invalid ConditionSource_t value. A new value might've been introduced that is not handled.");
|
|
33
34
|
}
|
|
34
|
-
|
|
35
|
+
|
|
35
36
|
std::string transport_condition_str;
|
|
36
37
|
const std::unordered_map<TransportCondition_t, std::string> transportConditionMap = {
|
|
37
38
|
{TRANSPORT_CONDITION_UNKNOWN, "Unknown"},
|
|
@@ -48,14 +49,14 @@ void v_transport_condition_change_cb(void *ctx, ConditionSource_t condition_sour
|
|
|
48
49
|
{TRANSPORT_CONDITION_WIFI_DISABLED, "WiFiDisabled"},
|
|
49
50
|
{TRANSPORT_CONDITION_TEMPORARILY_UNAVAILABLE, "TemporarilyUnavailable"},
|
|
50
51
|
};
|
|
51
|
-
|
|
52
|
+
|
|
52
53
|
auto it2 = transportConditionMap.find(transport_condition);
|
|
53
54
|
if (it2 != transportConditionMap.end()) {
|
|
54
55
|
transport_condition_str = it2->second;
|
|
55
56
|
} else {
|
|
56
57
|
throw std::invalid_argument("Invalid TransportCondition_t value. A new value might've been introduced that is not handled.");
|
|
57
58
|
}
|
|
58
|
-
|
|
59
|
+
|
|
59
60
|
jsCallback->call(runtime, condition_source_str, transport_condition_str);
|
|
60
61
|
});
|
|
61
62
|
}
|
|
@@ -204,7 +205,7 @@ Function ditto_register_transport_condition_changed_callback(Runtime &runtime)
|
|
|
204
205
|
CDitto_t *ditto = jsPointerObjectToCPointer<CDitto_t>(runtime, arguments[0]);
|
|
205
206
|
Function jsCallback = arguments[1].getObject(runtime).getFunction(runtime);
|
|
206
207
|
Arc<Function> wrappedStateFfiWrapper(std::move(jsCallback));
|
|
207
|
-
|
|
208
|
+
|
|
208
209
|
::ditto_register_transport_condition_changed_callback(ditto, Arc<Function>::as_raw(wrappedStateFfiWrapper), v_retain, v_release, v_transport_condition_change_cb);
|
|
209
210
|
return {};
|
|
210
211
|
});
|