@dittolive/ditto 4.5.2 → 4.5.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.
@@ -20,6 +20,6 @@ Pod::Spec.new do |s|
20
20
  s.public_header_files = 'react-native/dittoffi/dittoffi.h', 'react-native/dittoffi/ifaddrs.h'
21
21
 
22
22
  s.dependency "React-Core"
23
- s.dependency 'DittoReactNativeIOS', '~> 4.5.2'
23
+ s.dependency 'DittoReactNativeIOS', '~> 4.5.3'
24
24
 
25
25
  end
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.5.2**
6
+ Version: **4.5.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.5.2/api-reference/) for this particular version.
9
+ [API Reference](https://software.ditto.live/js/Ditto/4.5.3/api-reference/) for this particular version.
10
10
 
11
11
  ---
12
12
 
package/node/ditto.cjs.js CHANGED
@@ -1787,7 +1787,7 @@ class AttachmentToken {
1787
1787
 
1788
1788
  // NOTE: this is patched up with the actual build version by Jake task
1789
1789
  // build:package and has to be a valid semantic version as defined here: https://semver.org.
1790
- const fullBuildVersionString = '4.5.2';
1790
+ const fullBuildVersionString = '4.5.3';
1791
1791
 
1792
1792
  //
1793
1793
  // Copyright © 2021 DittoLive Incorporated. All rights reserved.
@@ -1787,7 +1787,7 @@ class AttachmentToken {
1787
1787
 
1788
1788
  // NOTE: this is patched up with the actual build version by Jake task
1789
1789
  // build:package and has to be a valid semantic version as defined here: https://semver.org.
1790
- const fullBuildVersionString = '4.5.2';
1790
+ const fullBuildVersionString = '4.5.3';
1791
1791
 
1792
1792
  //
1793
1793
  // Copyright © 2021 DittoLive Incorporated. All rights reserved.
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,16 +1,14 @@
1
1
  {
2
2
  "name": "@dittolive/ditto",
3
- "version": "4.5.2",
3
+ "version": "4.5.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",
7
-
8
7
  "author": {
9
8
  "name": "DittoLive Incorporated.",
10
9
  "email": "contact@ditto.live",
11
10
  "url": "https://ditto.live"
12
11
  },
13
-
14
12
  "keywords": [
15
13
  "ditto",
16
14
  "dittolive",
@@ -21,33 +19,27 @@
21
19
  "sync",
22
20
  "p2p"
23
21
  ],
24
-
25
22
  "engines": {
26
23
  "node": ">=14"
27
24
  },
28
-
29
25
  "browserslist": [
30
26
  "defaults"
31
27
  ],
32
-
33
28
  "main": "node/ditto.cjs.js",
34
29
  "browser": "web/ditto.es6.js",
35
30
  "browser/umd": "web/ditto.umd.js",
36
31
  "types": "types/ditto.d.ts",
37
32
  "react-native": "react-native/src/index.ts",
38
-
39
33
  "scripts": {
40
34
  "play:web": "npx serve --listen 5285",
41
35
  "play:node": "node --experimental-repl-await --unhandled-rejections=strict playground.cjs"
42
36
  },
43
-
44
37
  "dependencies": {
45
38
  "cbor-redux": "^1.0.0",
46
39
  "@ungap/weakrefs": "^0.2.0",
47
40
  "cbor-js": "^0.1.0",
48
41
  "fastestsmallesttextencoderdecoder": "^1.0.22"
49
42
  },
50
-
51
43
  "devDependencies": {
52
44
  "serve": "^14.2.0"
53
45
  }
@@ -169,7 +169,7 @@ task downloadBinaries {
169
169
  def defaultArchitectures = ['arm64-v8a', 'armeabi-v7a', 'x86', 'x86_64']
170
170
 
171
171
  defaultArchitectures.each { arch ->
172
- def fileUrl = "https://software.ditto.live/react-native/ditto/4.5.2/android/${arch}/libdittoffi.a"
172
+ def fileUrl = "https://software.ditto.live/react-native/ditto/4.5.3/android/${arch}/libdittoffi.a"
173
173
 
174
174
  new File("${project.projectDir}/../dittoffi/android/${arch}").mkdirs()
175
175
  def localFilePath = "${project.projectDir}/../dittoffi/android/${arch}/libdittoffi.a"
@@ -1,62 +1,63 @@
1
- "use strict";
1
+ 'use strict'
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.boxCBytesIntoBuffer = boxCBytesIntoBuffer;
7
- exports.boxCStringIntoString = boxCStringIntoString;
8
- exports.ditto_sdk_transports_init = ditto_sdk_transports_init;
9
- exports.getDeadlockTimeout = getDeadlockTimeout;
10
- exports.getMissingAndroidPermissions = getMissingAndroidPermissions;
11
- exports.setDeadlockTimeout = setDeadlockTimeout;
12
- var _reactNative = require("react-native");
13
- var _weakrefs = require("@ungap/weakrefs");
14
- require("fastestsmallesttextencoderdecoder");
3
+ Object.defineProperty(exports, '__esModule', {
4
+ value: true,
5
+ })
6
+ exports.boxCBytesIntoBuffer = boxCBytesIntoBuffer
7
+ exports.boxCStringIntoString = boxCStringIntoString
8
+ exports.ditto_sdk_transports_init = ditto_sdk_transports_init
9
+ exports.getDeadlockTimeout = getDeadlockTimeout
10
+ exports.getMissingAndroidPermissions = getMissingAndroidPermissions
11
+ exports.setDeadlockTimeout = setDeadlockTimeout
12
+ var _reactNative = require('react-native')
13
+ var _weakrefs = require('@ungap/weakrefs')
14
+ require('fastestsmallesttextencoderdecoder')
15
15
  // import { fullBuildVersionString } from '../../sources/build-time-constants';
16
16
 
17
- const dittoCore = global;
18
- const isLoaded = typeof dittoCore.ditto_sdk_transports_init === 'function';
17
+ const dittoCore = global
18
+ const isLoaded = typeof dittoCore.ditto_sdk_transports_init === 'function'
19
19
  if (!isLoaded) {
20
- var _NativeModules$DittoR;
21
- const result = (_NativeModules$DittoR = _reactNative.NativeModules.DittoRNSDK) === null || _NativeModules$DittoR === void 0 ? void 0 : _NativeModules$DittoR.install();
20
+ var _NativeModules$DittoR
21
+ const result = (_NativeModules$DittoR = _reactNative.NativeModules.DittoRNSDK) === null || _NativeModules$DittoR === void 0 ? void 0 : _NativeModules$DittoR.install()
22
22
  if (!result) {
23
- throw new Error('JSI bindings were not installed for: DittoRNSDK Module');
23
+ throw new Error('JSI bindings were not installed for: DittoRNSDK Module')
24
24
  }
25
25
 
26
26
  setInterval(() => {
27
- dittoCore.ditto_tick();
28
- }, 50);
27
+ dittoCore.ditto_tick()
28
+ }, 50)
29
29
 
30
30
  // Stay as close as possible to the JS SDK with the API
31
31
  // We have to rename the shim that has a different name.
32
32
  if (typeof global.FinalizationRegistry === 'undefined' && typeof _weakrefs.FinalizationGroup !== 'undefined') {
33
- global.FinalizationRegistry = _weakrefs.FinalizationGroup;
33
+ global.FinalizationRegistry = _weakrefs.FinalizationGroup
34
34
  }
35
35
  const platformName = _reactNative.Platform.select({
36
36
  ios: 'Ios',
37
37
  android: 'Android',
38
- default: 'Unknown'
39
- });
40
- dittoCore.ditto_init_sdk_version(platformName, 'JavaScript', '4.5.2');
38
+ default: 'Unknown',
39
+ })
40
+ dittoCore.ditto_init_sdk_version(platformName, 'JavaScript', '4.5.3')
41
41
  }
42
42
 
43
43
  // Export JSI methods.
44
44
  Object.keys(dittoCore)
45
- // we will provide our own decorated implementation.
46
- .filter(key => key !== 'ditto_sdk_transports_init').forEach(key => {
47
- exports[key] = dittoCore[key];
48
- });
45
+ // we will provide our own decorated implementation.
46
+ .filter((key) => key !== 'ditto_sdk_transports_init')
47
+ .forEach((key) => {
48
+ exports[key] = dittoCore[key]
49
+ })
49
50
 
50
51
  // Decorated implementation with an extra step of setting the context for
51
52
  // Transports to work on Android.
52
53
  function ditto_sdk_transports_init(transportsErrorPointer) {
53
54
  if (_reactNative.Platform.OS === 'android') {
54
- const res = dittoCore.ditto_sdk_transports_set_android_context();
55
+ const res = dittoCore.ditto_sdk_transports_set_android_context()
55
56
  if (!res) {
56
- throw new Error("Couldn't manage to set Android context with `ditto_sdk_transports_set_android_context()`");
57
+ throw new Error("Couldn't manage to set Android context with `ditto_sdk_transports_set_android_context()`")
57
58
  }
58
59
  }
59
- return dittoCore.ditto_sdk_transports_init(transportsErrorPointer);
60
+ return dittoCore.ditto_sdk_transports_init(transportsErrorPointer)
60
61
  }
61
62
 
62
63
  /**
@@ -67,9 +68,9 @@ function ditto_sdk_transports_init(transportsErrorPointer) {
67
68
  */
68
69
  function getMissingAndroidPermissions() {
69
70
  if (_reactNative.Platform.OS !== 'android') {
70
- return [];
71
+ return []
71
72
  }
72
- return dittoCore.ditto_sdk_transports_android_missing_permissions();
73
+ return dittoCore.ditto_sdk_transports_android_missing_permissions()
73
74
  }
74
75
 
75
76
  //
@@ -77,16 +78,16 @@ function getMissingAndroidPermissions() {
77
78
  //
78
79
 
79
80
  function boxCStringIntoString(something) {
80
- return something;
81
+ return something
81
82
  }
82
83
  function boxCBytesIntoBuffer(cborBytes) {
83
- const bytes = dittoCore.sliceBoxedToUInt8Array(cborBytes);
84
- return bytes ? new Uint8Array(bytes) : null;
84
+ const bytes = dittoCore.sliceBoxedToUInt8Array(cborBytes)
85
+ return bytes ? new Uint8Array(bytes) : null
85
86
  }
86
87
  function getDeadlockTimeout() {
87
- return 0;
88
+ return 0
88
89
  }
89
90
  function setDeadlockTimeout(something) {
90
- return something;
91
+ return something
91
92
  }
92
- //# sourceMappingURL=ditto.rn.js.map
93
+ //# sourceMappingURL=ditto.rn.js.map
@@ -1,58 +1,59 @@
1
- import { NativeModules, Platform } from 'react-native';
1
+ import { NativeModules, Platform } from 'react-native'
2
2
  // import { fullBuildVersionString } from '../../sources/build-time-constants';
3
3
 
4
4
  // @ts-ignore No types provided by the 3rd party
5
- import { FinalizationGroup } from '@ungap/weakrefs';
6
- import 'fastestsmallesttextencoderdecoder';
5
+ import { FinalizationGroup } from '@ungap/weakrefs'
6
+ import 'fastestsmallesttextencoderdecoder'
7
7
 
8
8
  // import type { Language, Platform as SDKPlatform } from '../../sources/ffi';
9
9
 
10
10
  // No need to define types for each of them as these will not be used anywhere,
11
11
  // but rather just pollute and require maintenance. It's good to highlight that
12
12
  // these will be exported, though.
13
- const dittoCore = global;
14
- const isLoaded = typeof dittoCore.ditto_sdk_transports_init === 'function';
13
+ const dittoCore = global
14
+ const isLoaded = typeof dittoCore.ditto_sdk_transports_init === 'function'
15
15
  if (!isLoaded) {
16
- var _NativeModules$DittoR;
17
- const result = (_NativeModules$DittoR = NativeModules.DittoRNSDK) === null || _NativeModules$DittoR === void 0 ? void 0 : _NativeModules$DittoR.install();
16
+ var _NativeModules$DittoR
17
+ const result = (_NativeModules$DittoR = NativeModules.DittoRNSDK) === null || _NativeModules$DittoR === void 0 ? void 0 : _NativeModules$DittoR.install()
18
18
  if (!result) {
19
- throw new Error('JSI bindings were not installed for: DittoRNSDK Module');
19
+ throw new Error('JSI bindings were not installed for: DittoRNSDK Module')
20
20
  }
21
21
 
22
22
  setInterval(() => {
23
- dittoCore.ditto_tick();
24
- }, 50);
23
+ dittoCore.ditto_tick()
24
+ }, 50)
25
25
 
26
26
  // Stay as close as possible to the JS SDK with the API
27
27
  // We have to rename the shim that has a different name.
28
28
  if (typeof global.FinalizationRegistry === 'undefined' && typeof FinalizationGroup !== 'undefined') {
29
- global.FinalizationRegistry = FinalizationGroup;
29
+ global.FinalizationRegistry = FinalizationGroup
30
30
  }
31
31
  const platformName = Platform.select({
32
32
  ios: 'Ios',
33
33
  android: 'Android',
34
- default: 'Unknown'
35
- });
36
- dittoCore.ditto_init_sdk_version(platformName, 'JavaScript', '4.5.2');
34
+ default: 'Unknown',
35
+ })
36
+ dittoCore.ditto_init_sdk_version(platformName, 'JavaScript', '4.5.3')
37
37
  }
38
38
 
39
39
  // Export JSI methods.
40
40
  Object.keys(dittoCore)
41
- // we will provide our own decorated implementation.
42
- .filter(key => key !== 'ditto_sdk_transports_init').forEach(key => {
43
- exports[key] = dittoCore[key];
44
- });
41
+ // we will provide our own decorated implementation.
42
+ .filter((key) => key !== 'ditto_sdk_transports_init')
43
+ .forEach((key) => {
44
+ exports[key] = dittoCore[key]
45
+ })
45
46
 
46
47
  // Decorated implementation with an extra step of setting the context for
47
48
  // Transports to work on Android.
48
49
  export function ditto_sdk_transports_init(transportsErrorPointer) {
49
50
  if (Platform.OS === 'android') {
50
- const res = dittoCore.ditto_sdk_transports_set_android_context();
51
+ const res = dittoCore.ditto_sdk_transports_set_android_context()
51
52
  if (!res) {
52
- throw new Error("Couldn't manage to set Android context with `ditto_sdk_transports_set_android_context()`");
53
+ throw new Error("Couldn't manage to set Android context with `ditto_sdk_transports_set_android_context()`")
53
54
  }
54
55
  }
55
- return dittoCore.ditto_sdk_transports_init(transportsErrorPointer);
56
+ return dittoCore.ditto_sdk_transports_init(transportsErrorPointer)
56
57
  }
57
58
 
58
59
  /**
@@ -63,9 +64,9 @@ export function ditto_sdk_transports_init(transportsErrorPointer) {
63
64
  */
64
65
  export function getMissingAndroidPermissions() {
65
66
  if (Platform.OS !== 'android') {
66
- return [];
67
+ return []
67
68
  }
68
- return dittoCore.ditto_sdk_transports_android_missing_permissions();
69
+ return dittoCore.ditto_sdk_transports_android_missing_permissions()
69
70
  }
70
71
 
71
72
  //
@@ -73,16 +74,16 @@ export function getMissingAndroidPermissions() {
73
74
  //
74
75
 
75
76
  export function boxCStringIntoString(something) {
76
- return something;
77
+ return something
77
78
  }
78
79
  export function boxCBytesIntoBuffer(cborBytes) {
79
- const bytes = dittoCore.sliceBoxedToUInt8Array(cborBytes);
80
- return bytes ? new Uint8Array(bytes) : null;
80
+ const bytes = dittoCore.sliceBoxedToUInt8Array(cborBytes)
81
+ return bytes ? new Uint8Array(bytes) : null
81
82
  }
82
83
  export function getDeadlockTimeout() {
83
- return 0;
84
+ return 0
84
85
  }
85
86
  export function setDeadlockTimeout(something) {
86
- return something;
87
+ return something
87
88
  }
88
- //# sourceMappingURL=ditto.rn.js.map
89
+ //# sourceMappingURL=ditto.rn.js.map