@dittolive/ditto 4.7.1 → 4.7.2-rc.3

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 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.7.1**
6
+ Version: **4.7.2-rc.3**
7
7
 
8
8
  For more information please visit [ditto.live](https://ditto.live), as well as the
9
- [API Reference](https://software.ditto.live/js/Ditto/4.7.1/api-reference/) for this particular version.
9
+ [API Reference](https://software.ditto.live/js/Ditto/4.7.2-rc.3/api-reference/) for this particular version.
10
10
 
11
11
  ---
12
12
 
package/node/ditto.cjs.js CHANGED
@@ -2222,7 +2222,7 @@ class AttachmentToken {
2222
2222
 
2223
2223
  // NOTE: this is patched up with the actual build version by Jake task
2224
2224
  // build:package and has to be a valid semantic version as defined here: https://semver.org.
2225
- const fullBuildVersionString = '4.7.1';
2225
+ const fullBuildVersionString = '4.7.2-rc.3';
2226
2226
 
2227
2227
  //
2228
2228
  // Copyright © 2021 DittoLive Incorporated. All rights reserved.
Binary file
Binary file
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.7.1",
3
+ "version": "4.7.2-rc.3",
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",
@@ -150,7 +150,7 @@ repositories {
150
150
 
151
151
  // This can be moved to gradle.properties (minus the quotes) with no code changes
152
152
  // here since `version` is a default project property.
153
- version = "4.7.1"
153
+ version = "4.7.2-rc.3"
154
154
 
155
155
  dependencies {
156
156
  // For < 0.71, this will be from the local maven repo
@@ -171,7 +171,7 @@ Function ditto_new_attachment_from_bytes(Runtime &runtime)
171
171
  return static_cast<double>(res);
172
172
  }
173
173
 
174
- Object const& attachment = arguments[2].getObject(runtime);
174
+ Object attachment = arguments[2].getObject(runtime);
175
175
 
176
176
  attachment.setProperty(runtime, "len", uint64ToBigIntOrNumber(runtime , c_attachment.len));
177
177
  // Factor this out as: cSliceToUInt8Array()
@@ -216,7 +216,7 @@ Function ditto_new_attachment_from_file(Runtime &runtime)
216
216
  return static_cast<double>(res);
217
217
  }
218
218
 
219
- Object const& attachment = arguments[3].getObject(runtime);
219
+ Object attachment = arguments[3].getObject(runtime);
220
220
 
221
221
  attachment.setProperty(runtime, "len", uint64ToBigIntOrNumber(runtime, c_attachment.len));
222
222
  // Factor this out as: cSliceToUInt8Array()
@@ -31,8 +31,8 @@ Function ditto_set_device_name(Runtime &runtime) {
31
31
  std::string device_name_str = jsTypedArrayToCString(runtime, arguments[1]);
32
32
  const char *device_name = device_name_str.c_str();
33
33
 
34
- ::ditto_set_device_name(ditto, device_name);
35
- return Value();
34
+ const char *res = ::ditto_set_device_name(ditto, device_name);
35
+ return cPointerToJSPointerObject<char>(runtime, res);
36
36
  });
37
37
  }
38
38
 
@@ -1451,7 +1451,7 @@ void
1451
1451
  * * `0` -- no error
1452
1452
  * * `1` -- an error
1453
1453
  * * `2` -- invalid id
1454
- * * `3` -- token not found
1454
+ * * `3` -- token never issued
1455
1455
  *
1456
1456
  * In case of a non-zero return value, error message can be retrieved using
1457
1457
  * `ditto_error_message` function.
@@ -3274,7 +3274,7 @@ void
3274
3274
  uint32_t retry_interval_millis);
3275
3275
 
3276
3276
  /** <No documentation available> */
3277
- void
3277
+ char *
3278
3278
  /* fn */ ditto_set_device_name (
3279
3279
  CDitto_t const * ditto,
3280
3280
  char const * device_name);
@@ -4028,7 +4028,7 @@ typedef enum dittoffi_error_code {
4028
4028
  DITTOFFI_ERROR_CODE_BASE64_INVALID,
4029
4029
  /** \brief
4030
4030
  * Outstanding usage of ditto's working directory detected when trying to instantiate a new
4031
- * `Ditto`, which would have lead to concurrent usage of the backing database files.
4031
+ * `Ditto`, which would have led to concurrent usage of the backing database files.
4032
4032
  */
4033
4033
  DITTOFFI_ERROR_CODE_LOCKED_DITTO_WORKING_DIRECTORY,
4034
4034
  /** \brief
@@ -259,9 +259,6 @@ export class Ditto {
259
259
  }
260
260
 
261
261
  if (validIdentity.type === 'sharedKey') {
262
- if (Environment.isReactNativeBuild) {
263
- throw new Error('Shared Key Identity is currently not implemented for React Native.')
264
- }
265
262
  return FFI.dittoIdentityConfigMakeSharedKey(validIdentity.appID, validIdentity.sharedKey, validIdentity.siteID)
266
263
  }
267
264